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.
10 11 12 13 |
# File 'lib/minitest/subjective/reporter.rb', line 10 def initialize(io = $stdout, = {}) super self.results = {} end |
Instance Attribute Details
#results ⇒ Object
Returns the value of attribute results.
8 9 10 |
# File 'lib/minitest/subjective/reporter.rb', line 8 def results @results end |
Instance Method Details
#record(result) ⇒ Object
15 16 17 |
# File 'lib/minitest/subjective/reporter.rb', line 15 def record(result) merge_result(result) end |
#report ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/minitest/subjective/reporter.rb', line 19 def report results.each do |subject_name, result| io.puts "Coverage for #{subject_name}:" io.puts coverage_headline_for(result) io.puts result.to_s unless result.covered? end end |