Class: Test::Unit::Error

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



15
16
17
18
19
20
21
22
23
24
# File 'lib/test_extensions/test_colorizer.rb', line 15

def long_display
  backtrace = filter_backtrace(@exception.backtrace).join("\n    ")
  [
    "Error".red.bold, 
    ":\n", 
    "#@test_name:".white, 
    "\n", "#{message}".red, 
    "\n    #{backtrace}".gsub(/:(\d+):/,":#{'\1'.red}:")
  ].join('')
end

#single_character_displayObject

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



10
11
12
# File 'lib/test_extensions/test_colorizer.rb', line 10

def single_character_display
  "E".red.bold
end