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:.
-
#passed? ⇒ Boolean
:nodoc:.
-
#record(result) ⇒ Object
:nodoc:.
-
#report ⇒ Object
:nodoc:.
-
#start ⇒ Object
:nodoc:.
Constructor Details
#initialize(*reporters) ⇒ CompositeReporter
:nodoc:
689 690 691 |
# File 'lib/minitest.rb', line 689 def initialize *reporters # :nodoc: self.reporters = reporters end |
Instance Attribute Details
#reporters ⇒ Object
The list of reporters to dispatch to.
687 688 689 |
# File 'lib/minitest.rb', line 687 def reporters @reporters end |
Instance Method Details
#<<(reporter) ⇒ Object
Add another reporter to the mix.
696 697 698 |
# File 'lib/minitest.rb', line 696 def << reporter self.reporters << reporter end |
#passed? ⇒ Boolean
:nodoc:
700 701 702 |
# File 'lib/minitest.rb', line 700 def passed? # :nodoc: self.reporters.all?(&:passed?) end |
#record(result) ⇒ Object
:nodoc:
708 709 710 711 712 |
# File 'lib/minitest.rb', line 708 def record result # :nodoc: self.reporters.each do |reporter| reporter.record result end end |
#report ⇒ Object
:nodoc:
714 715 716 |
# File 'lib/minitest.rb', line 714 def report # :nodoc: self.reporters.each(&:report) end |
#start ⇒ Object
:nodoc:
704 705 706 |
# File 'lib/minitest.rb', line 704 def start # :nodoc: self.reporters.each(&:start) end |