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:.
-
#prerecord(klass, name) ⇒ Object
:nodoc:.
-
#record(result) ⇒ Object
:nodoc:.
-
#report ⇒ Object
:nodoc:.
-
#start ⇒ Object
:nodoc:.
Methods inherited from AbstractReporter
Constructor Details
#initialize(*reporters) ⇒ CompositeReporter
:nodoc:
994 995 996 997 |
# File 'lib/minitest.rb', line 994 def initialize *reporters # :nodoc: super() self.reporters = reporters end |
Instance Attribute Details
#reporters ⇒ Object
The list of reporters to dispatch to.
992 993 994 |
# File 'lib/minitest.rb', line 992 def reporters @reporters end |
Instance Method Details
#<<(reporter) ⇒ Object
Add another reporter to the mix.
1006 1007 1008 |
# File 'lib/minitest.rb', line 1006 def << reporter self.reporters << reporter end |
#io ⇒ Object
:nodoc:
999 1000 1001 |
# File 'lib/minitest.rb', line 999 def io # :nodoc: reporters.first.io end |
#passed? ⇒ Boolean
:nodoc:
1010 1011 1012 |
# File 'lib/minitest.rb', line 1010 def passed? # :nodoc: self.reporters.all?(&:passed?) end |
#prerecord(klass, name) ⇒ Object
:nodoc:
1018 1019 1020 1021 1022 |
# File 'lib/minitest.rb', line 1018 def prerecord klass, name # :nodoc: self.reporters.each do |reporter| reporter.prerecord klass, name end end |
#record(result) ⇒ Object
:nodoc:
1024 1025 1026 1027 1028 |
# File 'lib/minitest.rb', line 1024 def record result # :nodoc: self.reporters.each do |reporter| reporter.record result end end |
#report ⇒ Object
:nodoc:
1030 1031 1032 |
# File 'lib/minitest.rb', line 1030 def report # :nodoc: self.reporters.each(&:report) end |
#start ⇒ Object
:nodoc:
1014 1015 1016 |
# File 'lib/minitest.rb', line 1014 def start # :nodoc: self.reporters.each(&:start) end |