Class: Test::Unit::Failure

Inherits:
Object
  • Object
show all
Defined in:
lib/test_extensions/test_colorizer.rb

Instance Method Summary collapse

Instance Method Details

#long_displayObject

the long message that is displayed after test is run



35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/test_extensions/test_colorizer.rb', line 35

def long_display
  location_display = if(location.size == 1)
    location[0].sub(/\A(.+:\d+).*/, ' [\\1]')
  else
    "\n    [#{location.join("\n     ")}]"
  end
  [
    "Failure".yellow.bold, 
    ":\n","#@test_name".white, 
    "#{location_display}".gsub(/:(\d+)/, ":#{'\1'.yellow}"), 
    ":\n", "#@message".yellow
  ].join('')
end

#single_character_displayObject

the ā€˜Eā€™ that is displayed as the tests are run



30
31
32
# File 'lib/test_extensions/test_colorizer.rb', line 30

def single_character_display
  "F".yellow.bold
end