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
44 |
# File 'lib/redgreen.rb', line 44 alias :old_to_s :to_s |
#to_s ⇒ Object
45 46 47 48 49 |
# File 'lib/redgreen.rb', line 45 def to_s if old_to_s =~ /\d+ tests, \d+ assertions, (\d+) failures, (\d+) errors/ Color.send($1.to_i != 0 || $2.to_i != 0 ? :red : :green, $&) end end |