Class: Minitest::SummaryReporter
- Inherits:
-
Object
- Object
- Minitest::SummaryReporter
- Defined in:
- lib/minitest/summary_reporter.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.be_gentle! ⇒ Object
3 4 5 6 7 |
# File 'lib/minitest/summary_reporter.rb', line 3 def self.be_gentle! define_method :aggregated_results do passing_assertions + first_failure end end |
Instance Method Details
#first_failure ⇒ Object
:nodoc:
17 18 19 20 21 22 23 |
# File 'lib/minitest/summary_reporter.rb', line 17 def first_failure # :nodoc: filtered_results = results.dup filtered_results.reject!(&:skipped?) unless [:verbose] filtered_results[0..0].map do |result| "\n%s" % [result] end.join("\n") + "\n" end |
#passing_assertions ⇒ Object
9 10 11 |
# File 'lib/minitest/summary_reporter.rb', line 9 def passing_assertions "\n\t%s passing #{pluralized_assertion}.\n" % assertions end |
#pluralized_assertion ⇒ Object
13 14 15 |
# File 'lib/minitest/summary_reporter.rb', line 13 def pluralized_assertion assertions == 1 ? 'assertion' : 'assertions' end |