Class: Minitest::SprintReporter
- Inherits:
-
AbstractReporter
- Object
- AbstractReporter
- Minitest::SprintReporter
- Defined in:
- lib/minitest/sprint_reporter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#results ⇒ Object
Returns the value of attribute results.
Instance Method Summary collapse
-
#initialize ⇒ SprintReporter
constructor
A new instance of SprintReporter.
- #record(result) ⇒ Object
- #report ⇒ Object
Constructor Details
#initialize ⇒ SprintReporter
Returns a new instance of SprintReporter.
5 6 7 |
# File 'lib/minitest/sprint_reporter.rb', line 5 def initialize self.results = [] end |
Instance Attribute Details
#results ⇒ Object
Returns the value of attribute results.
3 4 5 |
# File 'lib/minitest/sprint_reporter.rb', line 3 def results @results end |
Instance Method Details
#record(result) ⇒ Object
9 10 11 |
# File 'lib/minitest/sprint_reporter.rb', line 9 def record result results << result unless result.passed? or result.skipped? end |
#report ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/minitest/sprint_reporter.rb', line 13 def report return if results.empty? puts puts "Happy Happy Sprint List:" puts print_list puts end |