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.
30 31 32 |
# File 'lib/redgreen.rb', line 30 def initialize(suite, output_level=NORMAL, io=$stdout) super end |
Instance Method Details
#output_single(something, level = NORMAL) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/redgreen.rb', line 34 def output_single(something, level=NORMAL) return unless (output?(level)) if something == "." something = RedGreen::Color.green(something) elsif something == 'F' something = RedGreen::Color.red(something) elsif something == "E" something = RedGreen::Color.yellow(something) end @io.write(something) @io.flush end |