Class: Rproof::CompositeReporter
- Inherits:
-
AbstractReporter
- Object
- AbstractReporter
- Rproof::CompositeReporter
- Defined in:
- lib/rproof/composite_reporter.rb
Instance Method Summary collapse
- #add(reporter) ⇒ Object
-
#initialize ⇒ CompositeReporter
constructor
A new instance of CompositeReporter.
- #report_assertion(assertion) ⇒ Object
- #report_campaign_begin ⇒ Object
- #report_campaign_end(test_results, start_time, end_time) ⇒ Object
- #report_exception(exception) ⇒ Object
- #report_suite_begin(id, name, description) ⇒ Object
- #report_suite_end(id, test_results) ⇒ Object
- #report_test_begin(id, name, description) ⇒ Object
- #report_test_end(id, test_result) ⇒ Object
- #report_warning(warning) ⇒ Object
Constructor Details
#initialize ⇒ CompositeReporter
Returns a new instance of CompositeReporter.
9 10 11 |
# File 'lib/rproof/composite_reporter.rb', line 9 def initialize @reporters = [] end |
Instance Method Details
#add(reporter) ⇒ Object
13 14 15 |
# File 'lib/rproof/composite_reporter.rb', line 13 def add(reporter) @reporters << reporter end |
#report_assertion(assertion) ⇒ Object
29 30 31 |
# File 'lib/rproof/composite_reporter.rb', line 29 def report_assertion(assertion) @reporters.each { |r| r.report_assertion assertion } end |
#report_campaign_begin ⇒ Object
17 18 19 |
# File 'lib/rproof/composite_reporter.rb', line 17 def report_campaign_begin @reporters.each { |r| r.report_campaign_begin } end |
#report_campaign_end(test_results, start_time, end_time) ⇒ Object
49 50 51 |
# File 'lib/rproof/composite_reporter.rb', line 49 def report_campaign_end(test_results, start_time, end_time) @reporters.each { |r| r.report_campaign_end test_results, start_time, end_time } end |
#report_exception(exception) ⇒ Object
37 38 39 |
# File 'lib/rproof/composite_reporter.rb', line 37 def report_exception(exception) @reporters.each { |r| r.report_exception exception } end |
#report_suite_begin(id, name, description) ⇒ Object
21 22 23 |
# File 'lib/rproof/composite_reporter.rb', line 21 def report_suite_begin(id, name, description) @reporters.each { |r| r.report_suite_begin id, name, description } end |
#report_suite_end(id, test_results) ⇒ Object
45 46 47 |
# File 'lib/rproof/composite_reporter.rb', line 45 def report_suite_end(id, test_results) @reporters.each { |r| r.report_suite_end id, test_results } end |
#report_test_begin(id, name, description) ⇒ Object
25 26 27 |
# File 'lib/rproof/composite_reporter.rb', line 25 def report_test_begin(id, name, description) @reporters.each { |r| r.report_test_begin id, name, description } end |
#report_test_end(id, test_result) ⇒ Object
41 42 43 |
# File 'lib/rproof/composite_reporter.rb', line 41 def report_test_end(id, test_result) @reporters.each { |r| r.report_test_end id, test_result } end |
#report_warning(warning) ⇒ Object
33 34 35 |
# File 'lib/rproof/composite_reporter.rb', line 33 def report_warning(warning) @reporters.each { |r| r.report_warning warning } end |