Class: Moto::Reporting::Listeners::SummaryShort
- Defined in:
- lib/reporting/listeners/summary_short.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #end_run(run_status) ⇒ Object
- #end_test(test_status) ⇒ Object
-
#initialize(run_params) ⇒ SummaryShort
constructor
A new instance of SummaryShort.
- #start_test(test_status, test_metadata) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(run_params) ⇒ SummaryShort
Returns a new instance of SummaryShort.
6 7 8 9 |
# File 'lib/reporting/listeners/summary_short.rb', line 6 def initialize(run_params) @displayed_results = 0 @semaphore = Mutex.new end |
Instance Method Details
#end_run(run_status) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/reporting/listeners/summary_short.rb', line 11 def end_run(run_status) puts '' puts "FINISHED: #{run_status.to_s}, duration: #{Time.at(run_status.duration).utc.strftime("%H:%M:%S")}" puts "Tests executed: #{run_status.tests_all.length}" puts " Passed: #{run_status.tests_passed.length}" puts " Failure: #{run_status.tests_failed.length}" puts " Error: #{run_status.tests_error.length}" puts " Skipped: #{run_status.tests_skipped.length}" end |
#end_test(test_status) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/reporting/listeners/summary_short.rb', line 24 def end_test(test_status) @semaphore.synchronize do @displayed_results += 1 representation = case test_status.results.last.code when Moto::Test::Result::PASSED then '.' when Moto::Test::Result::FAILURE then 'F' when Moto::Test::Result::ERROR then 'E' when Moto::Test::Result::SKIPPED then 's' end if @displayed_results%50 != 0 print representation else puts representation end end end |
#start_test(test_status, test_metadata) ⇒ Object
21 22 |
# File 'lib/reporting/listeners/summary_short.rb', line 21 def start_test(test_status, ) end |