Class: SelfTestingFramework::Reporter
- Inherits:
-
Object
- Object
- SelfTestingFramework::Reporter
- Defined in:
- lib/self_testing_framework/reporter.rb
Instance Method Summary collapse
Instance Method Details
#report(test_result) ⇒ Object
4 5 6 |
# File 'lib/self_testing_framework/reporter.rb', line 4 def report(test_result) print test_result[:error] ? 'F' : '.' end |
#total_report(test_results) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/self_testing_framework/reporter.rb', line 8 def total_report(test_results) r = test_results puts "\n\n" r.errors.each do |e| puts "#{e[:class_name]}##{e[:test_name]}" puts " ERROR: #{e[:error]}" end puts "\n" puts "--------------------------------------------" #puts "Total Results:" puts "Tests: #{r.total_count}, Passed: #{r.passed_count}, Errors: #{r.errors_count}" end |