Class: Minitest::CompositeReporter
- Inherits:
-
AbstractReporter
- Object
- AbstractReporter
- Minitest::CompositeReporter
- Defined in:
- lib/minitest.rb
Overview
Dispatch to multiple reporters as one.
Instance Attribute Summary collapse
-
#reporters ⇒ Object
The list of reporters to dispatch to.
Instance Method Summary collapse
-
#<<(reporter) ⇒ Object
Add another reporter to the mix.
-
#initialize(*reporters) ⇒ CompositeReporter
constructor
:nodoc:.
-
#io ⇒ Object
:nodoc:.
-
#passed? ⇒ Boolean
:nodoc:.
-
#record(result) ⇒ Object
:nodoc:.
-
#report ⇒ Object
:nodoc:.
-
#start ⇒ Object
:nodoc:.
Constructor Details
#initialize(*reporters) ⇒ CompositeReporter
:nodoc:
627 628 629 630 |
# File 'lib/minitest.rb', line 627 def initialize *reporters # :nodoc: super() self.reporters = reporters end |
Instance Attribute Details
#reporters ⇒ Object
The list of reporters to dispatch to.
625 626 627 |
# File 'lib/minitest.rb', line 625 def reporters @reporters end |
Instance Method Details
#<<(reporter) ⇒ Object
Add another reporter to the mix.
639 640 641 |
# File 'lib/minitest.rb', line 639 def << reporter self.reporters << reporter end |
#io ⇒ Object
:nodoc:
632 633 634 |
# File 'lib/minitest.rb', line 632 def io # :nodoc: reporters.first.io end |
#passed? ⇒ Boolean
:nodoc:
643 644 645 |
# File 'lib/minitest.rb', line 643 def passed? # :nodoc: self.reporters.all?(&:passed?) end |
#record(result) ⇒ Object
:nodoc:
651 652 653 654 655 |
# File 'lib/minitest.rb', line 651 def record result # :nodoc: self.reporters.each do |reporter| reporter.record result end end |
#report ⇒ Object
:nodoc:
657 658 659 |
# File 'lib/minitest.rb', line 657 def report # :nodoc: self.reporters.each(&:report) end |
#start ⇒ Object
:nodoc:
647 648 649 |
# File 'lib/minitest.rb', line 647 def start # :nodoc: self.reporters.each(&:start) end |