Class: FlakyTestTracker::Reporter::CollectionReporter
- Inherits:
-
Object
- Object
- FlakyTestTracker::Reporter::CollectionReporter
- Defined in:
- lib/flaky_test_tracker/reporter/collection_reporter.rb
Overview
Reporter for a collection of reporter.
Instance Attribute Summary collapse
-
#reporters ⇒ #tracked_test #tracked_tests #resolved_test #resolved_tests
The current value of reporters.
Class Method Summary collapse
-
.build(reporters:) ⇒ Object
Returns a new instance of CollectionReporter.
Instance Method Summary collapse
-
#initialize(reporters: []) ⇒ CollectionReporter
constructor
A new instance of CollectionReporter.
- #resolved_tests(tests:) ⇒ Object
- #tracked_tests(tests:, source:, context:) ⇒ Object
Constructor Details
#initialize(reporters: []) ⇒ CollectionReporter
Returns a new instance of CollectionReporter.
16 17 18 |
# File 'lib/flaky_test_tracker/reporter/collection_reporter.rb', line 16 def initialize(reporters: []) @reporters = reporters end |
Instance Attribute Details
#reporters ⇒ #tracked_test #tracked_tests #resolved_test #resolved_tests
Returns the current value of reporters.
8 9 10 |
# File 'lib/flaky_test_tracker/reporter/collection_reporter.rb', line 8 def reporters @reporters end |
Class Method Details
.build(reporters:) ⇒ Object
Returns a new instance of FlakyTestTracker::Reporter::CollectionReporter.
12 13 14 |
# File 'lib/flaky_test_tracker/reporter/collection_reporter.rb', line 12 def self.build(reporters:) new(reporters: reporters) end |
Instance Method Details
#resolved_tests(tests:) ⇒ Object
28 29 30 31 32 |
# File 'lib/flaky_test_tracker/reporter/collection_reporter.rb', line 28 def resolved_tests(tests:) reporters.each do |reporter| reporter.resolved_tests(tests: tests) end end |
#tracked_tests(tests:, source:, context:) ⇒ Object
21 22 23 24 25 |
# File 'lib/flaky_test_tracker/reporter/collection_reporter.rb', line 21 def tracked_tests(tests:, source:, context:) reporters.each do |reporter| reporter.tracked_tests(tests: tests, source: source, context: context) end end |