Class: Grntest::Reporters::StreamReporter
- Inherits:
-
BaseReporter
- Object
- BaseReporter
- Grntest::Reporters::StreamReporter
- Defined in:
- lib/grntest/reporters/stream-reporter.rb
Instance Method Summary collapse
-
#initialize(tester) ⇒ StreamReporter
constructor
A new instance of StreamReporter.
- #on_finish(result) ⇒ Object
- #on_start(result) ⇒ Object
- #on_suite_finish(worker) ⇒ Object
- #on_suite_start(worker) ⇒ Object
- #on_test_failure(worker, result) ⇒ Object
- #on_test_finish(worker, result) ⇒ Object
- #on_test_leak(worker, result) ⇒ Object
- #on_test_no_check(worker, result) ⇒ Object
- #on_test_omission(worker, result) ⇒ Object
- #on_test_start(worker) ⇒ Object
- #on_test_success(worker, result) ⇒ Object
- #on_worker_finish(worker_id) ⇒ Object
- #on_worker_start(worker) ⇒ Object
Constructor Details
#initialize(tester) ⇒ StreamReporter
Returns a new instance of StreamReporter.
23 24 25 |
# File 'lib/grntest/reporters/stream-reporter.rb', line 23 def initialize(tester) super end |
Instance Method Details
#on_finish(result) ⇒ Object
80 81 82 83 |
# File 'lib/grntest/reporters/stream-reporter.rb', line 80 def on_finish(result) puts report_summary(result) end |
#on_start(result) ⇒ Object
27 28 |
# File 'lib/grntest/reporters/stream-reporter.rb', line 27 def on_start(result) end |
#on_suite_finish(worker) ⇒ Object
74 75 |
# File 'lib/grntest/reporters/stream-reporter.rb', line 74 def on_suite_finish(worker) end |
#on_suite_start(worker) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/grntest/reporters/stream-reporter.rb', line 33 def on_suite_start(worker) if worker.suite_name.bytesize <= @term_width puts(worker.suite_name) else puts(justify(worker.suite_name, @term_width)) end @output.flush end |
#on_test_failure(worker, result) ⇒ Object
51 52 53 54 |
# File 'lib/grntest/reporters/stream-reporter.rb', line 51 def on_test_failure(worker, result) report_test_result(result, worker.status) report_failure(result) end |
#on_test_finish(worker, result) ⇒ Object
71 72 |
# File 'lib/grntest/reporters/stream-reporter.rb', line 71 def on_test_finish(worker, result) end |
#on_test_leak(worker, result) ⇒ Object
56 57 58 59 |
# File 'lib/grntest/reporters/stream-reporter.rb', line 56 def on_test_leak(worker, result) report_test_result(result, worker.status) report_actual(result) unless result.checked? end |
#on_test_no_check(worker, result) ⇒ Object
66 67 68 69 |
# File 'lib/grntest/reporters/stream-reporter.rb', line 66 def on_test_no_check(worker, result) report_test_result(result, worker.status) report_actual(result) end |
#on_test_omission(worker, result) ⇒ Object
61 62 63 64 |
# File 'lib/grntest/reporters/stream-reporter.rb', line 61 def on_test_omission(worker, result) report_test_result(result, worker.status) report_actual(result) end |
#on_test_start(worker) ⇒ Object
42 43 44 45 |
# File 'lib/grntest/reporters/stream-reporter.rb', line 42 def on_test_start(worker) print(" #{worker.test_name}") @output.flush end |
#on_test_success(worker, result) ⇒ Object
47 48 49 |
# File 'lib/grntest/reporters/stream-reporter.rb', line 47 def on_test_success(worker, result) report_test_result(result, worker.status) end |
#on_worker_finish(worker_id) ⇒ Object
77 78 |
# File 'lib/grntest/reporters/stream-reporter.rb', line 77 def on_worker_finish(worker_id) end |
#on_worker_start(worker) ⇒ Object
30 31 |
# File 'lib/grntest/reporters/stream-reporter.rb', line 30 def on_worker_start(worker) end |