Class: Minitest::CompositeReporter
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
AbstractReporter
|
|
Instance Chain:
self,
AbstractReporter ,
Mutex_m
|
|
Inherits: |
Minitest::AbstractReporter
|
Defined in: | lib/minitest.rb |
Overview
Dispatch to multiple reporters as one.
Class Method Summary
- .new(*reporters) ⇒ CompositeReporter constructor Internal use only
Instance Attribute Summary
-
#reporters
rw
The list of reporters to dispatch to.
- #passed? ⇒ Boolean readonly Internal use only
AbstractReporter
- Inherited
#passed? | Did this run pass? |
Instance Method Summary
-
#<<(reporter)
Add another reporter to the mix.
- #io Internal use only
- #prerecord(klass, name) Internal use only
- #record(result) Internal use only
- #report Internal use only
- #start Internal use only
AbstractReporter
- Inherited
#prerecord | About to start running a test. |
#record | Record a result and output the Runnable#result_code. |
#report | Outputs the summary of the run. |
#start | Starts reporting on the run. |
Constructor Details
.new(*reporters) ⇒ CompositeReporter
This method is for internal use only.
Instance Attribute Details
#passed? ⇒ Boolean
(readonly)
This method is for internal use only.
[ GitHub ]
# File 'lib/minitest.rb', line 786
def passed? # :nodoc: self.reporters.all?(&:passed?) end
#reporters (rw)
The list of reporters to dispatch to.
# File 'lib/minitest.rb', line 768
attr_accessor :reporters
Instance Method Details
#<<(reporter)
Add another reporter to the mix.
# File 'lib/minitest.rb', line 782
def << reporter self.reporters << reporter end
#io
This method is for internal use only.
[ GitHub ]
# File 'lib/minitest.rb', line 775
def io # :nodoc: reporters.first.io end
#prerecord(klass, name)
This method is for internal use only.
[ GitHub ]
# File 'lib/minitest.rb', line 794
def prerecord klass, name # :nodoc: self.reporters.each do |reporter| # TODO: remove conditional for minitest 6 reporter.prerecord klass, name if reporter.respond_to? :prerecord end end
#record(result)
This method is for internal use only.
[ GitHub ]
# File 'lib/minitest.rb', line 801
def record result # :nodoc: self.reporters.each do |reporter| reporter.record result end end
#report
This method is for internal use only.
[ GitHub ]
# File 'lib/minitest.rb', line 807
def report # :nodoc: self.reporters.each(&:report) end
#start
This method is for internal use only.
[ GitHub ]
# File 'lib/minitest.rb', line 790
def start # :nodoc: self.reporters.each(&:start) end