Class: Test::Unit::TestResult
- Inherits:
-
Object
- Object
- Test::Unit::TestResult
- Defined in:
- lib/redgreen.rb
Instance Method Summary collapse
Instance Method Details
#old_to_s ⇒ Object
58 |
# File 'lib/redgreen.rb', line 58 alias :old_to_s :to_s |
#to_s ⇒ Object
59 60 61 62 63 |
# File 'lib/redgreen.rb', line 59 def to_s if old_to_s =~ /\d+ tests, \d+ assertions, (\d+) failures, (\d+) errors/ RedGreen::Color.send($1.to_i != 0 || $2.to_i != 0 ? :red : :green, $&) end end |