Class: Minitest::CompositeReporter
Overview
Dispatch to multiple reporters as one.
Instance Attribute Summary collapse
-
#reporters ⇒ Object
The list of reporters to dispatch to.
Attributes inherited from Reporter
#assertions, #count, #io, #old_sync, #options, #results, #start_time, #sync
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:.
Methods inherited from Reporter
#run_and_report, #simple_record, synchronize
Constructor Details
#initialize(*reporters) ⇒ CompositeReporter
:nodoc:
475 476 477 |
# File 'lib/minitest.rb', line 475 def initialize *reporters # :nodoc: self.reporters = reporters end |
Instance Attribute Details
#reporters ⇒ Object
The list of reporters to dispatch to.
473 474 475 |
# File 'lib/minitest.rb', line 473 def reporters @reporters end |
Instance Method Details
#<<(reporter) ⇒ Object
Add another reporter to the mix.
482 483 484 |
# File 'lib/minitest.rb', line 482 def << reporter self.reporters << reporter end |
#passed? ⇒ Boolean
:nodoc:
486 487 488 |
# File 'lib/minitest.rb', line 486 def passed? # :nodoc: self.reporters.all?(&:passed?) end |
#record(result) ⇒ Object
:nodoc:
494 495 496 497 498 |
# File 'lib/minitest.rb', line 494 def record result # :nodoc: self.reporters.each do |reporter| reporter.record result end end |
#report ⇒ Object
:nodoc:
500 501 502 |
# File 'lib/minitest.rb', line 500 def report # :nodoc: self.reporters.each(&:report) end |
#start ⇒ Object
:nodoc:
490 491 492 |
# File 'lib/minitest.rb', line 490 def start # :nodoc: self.reporters.each(&:start) end |