Class: Test::Unit::UI::Console::RedGreenTestRunner
- Inherits:
-
TestRunner
- Object
- TestRunner
- Test::Unit::UI::Console::RedGreenTestRunner
- Defined in:
- lib/redgreen.rb
Instance Method Summary collapse
-
#initialize(suite, output_level = NORMAL, io = $stdout) ⇒ RedGreenTestRunner
constructor
A new instance of RedGreenTestRunner.
- #output_single(something, level = NORMAL) ⇒ Object
Constructor Details
#initialize(suite, output_level = NORMAL, io = $stdout) ⇒ RedGreenTestRunner
Returns a new instance of RedGreenTestRunner.
16 17 18 |
# File 'lib/redgreen.rb', line 16 def initialize(suite, output_level=NORMAL, io=$stdout) super end |
Instance Method Details
#output_single(something, level = NORMAL) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/redgreen.rb', line 20 def output_single(something, level=NORMAL) return unless (output?(level)) something = case something when '.' then Color.green('.') when 'F' then Color.red("F") when 'E' then Color.yellow("E") else something end @io.write(something) @io.flush end |