Class: Minitest::Subjective::Reporter
- Inherits:
-
Reporter
- Object
- Reporter
- Minitest::Subjective::Reporter
- Defined in:
- lib/minitest/subjective/reporter.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#results ⇒ Object
Returns the value of attribute results.
Instance Method Summary collapse
-
#initialize(io = $stdout, options = {}) ⇒ Reporter
constructor
A new instance of Reporter.
- #record(result) ⇒ Object
- #report ⇒ Object
Constructor Details
#initialize(io = $stdout, options = {}) ⇒ Reporter
Returns a new instance of Reporter.
8 9 10 11 |
# File 'lib/minitest/subjective/reporter.rb', line 8 def initialize(io = $stdout, = {}) super self.results = {} end |
Instance Attribute Details
#results ⇒ Object
Returns the value of attribute results.
6 7 8 |
# File 'lib/minitest/subjective/reporter.rb', line 6 def results @results end |
Instance Method Details
#record(result) ⇒ Object
13 14 15 |
# File 'lib/minitest/subjective/reporter.rb', line 13 def record(result) merge_result(result) end |
#report ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/minitest/subjective/reporter.rb', line 17 def report results.each do |subject_name, result| io.puts io.puts "Coverage for #{subject_name}:" io.puts coverage_headline_for(result) io.puts result.to_s unless result.covered? end end |