Class: Minitest::Hyper::Reporter
- Inherits:
-
StatisticsReporter
- Object
- StatisticsReporter
- Minitest::Hyper::Reporter
- Defined in:
- lib/minitest/hyper/reporter.rb
Defined Under Namespace
Classes: HashFormatter
Instance Attribute Summary collapse
-
#all_results ⇒ Object
Returns the value of attribute all_results.
Instance Method Summary collapse
-
#initialize(io = $stdout, options = {}) ⇒ Reporter
constructor
A new instance of Reporter.
- #record(result) ⇒ Object
- #report ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(io = $stdout, options = {}) ⇒ Reporter
Returns a new instance of Reporter.
8 9 10 11 |
# File 'lib/minitest/hyper/reporter.rb', line 8 def initialize(io = $stdout, = {}) super self.all_results = [] end |
Instance Attribute Details
#all_results ⇒ Object
Returns the value of attribute all_results.
6 7 8 |
# File 'lib/minitest/hyper/reporter.rb', line 6 def all_results @all_results end |
Instance Method Details
#record(result) ⇒ Object
13 14 15 16 |
# File 'lib/minitest/hyper/reporter.rb', line 13 def record(result) super all_results << result end |
#report ⇒ Object
18 19 20 21 22 23 |
# File 'lib/minitest/hyper/reporter.rb', line 18 def report super @report = Report.new(self) @report.write io.puts "Wrote HTML test report to #{ @report.url }" end |
#to_h ⇒ Object
25 26 27 |
# File 'lib/minitest/hyper/reporter.rb', line 25 def to_h HashFormatter.as_hash(self) end |