Class: Test::Unit::UI::Console::RedGreenTestRunner

Inherits:
TestRunner
  • Object
show all
Defined in:
lib/redgreen.rb

Instance Method Summary collapse

Constructor Details

#initialize(suite, output_level = NORMAL, io = $stdout) ⇒ 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
# File 'lib/redgreen.rb', line 34

def output_single(something, level=NORMAL)
  return unless (output?(level))
  something = case something
  when '.' then RedGreen::Color.green('.')
  when 'F' then RedGreen::Color.red("F")
  when 'E' then RedGreen::Color.yellow("E")
  else something
  end
  @io.write(something)
  @io.flush
end