Class: Test::Unit::TestResult
- Inherits:
-
Object
- Object
- Test::Unit::TestResult
- Defined in:
- lib/shoulda/color.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#old_to_s ⇒ Object
25 |
# File 'lib/shoulda/color.rb', line 25 alias :old_to_s :to_s |
#to_s ⇒ Object
26 27 28 29 30 |
# File 'lib/shoulda/color.rb', line 26 def to_s if old_to_s =~ /\d+ tests, \d+ assertions, (\d+) failures, (\d+) errors/ ThoughtBot::Shoulda::Color.send($1.to_i != 0 || $2.to_i != 0 ? :red : :green, $&) end end |