Class: Minitest::SprintReporter

Inherits:
AbstractReporter
  • Object
show all
Defined in:
lib/minitest/sprint_reporter.rb

Direct Known Subclasses

BinstubReporter, RakeReporter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSprintReporter

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

#resultsObject

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

#reportObject



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