Class: Test::Unit::Failure
- Inherits:
-
Object
- Object
- Test::Unit::Failure
- Defined in:
- lib/unittest-colorizer.rb
Instance Method Summary collapse
- #long_display ⇒ Object
- #plain_long_display ⇒ Object
- #plain_short_display ⇒ Object
- #plain_single_character_display ⇒ Object
- #short_display ⇒ Object
- #single_character_display ⇒ Object
Instance Method Details
#long_display ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'lib/unittest-colorizer.rb', line 57 def long_display location_display = if(location.size == 1) location[0].sub(/\A(.+:\d+).*/, ' [\\1]') else "\n [#{location.join("\n ")}]" end "Failure:\n#{@test_name.green}#{location_display}:\n#@message" end |
#plain_long_display ⇒ Object
56 |
# File 'lib/unittest-colorizer.rb', line 56 alias_method :plain_long_display, :long_display |
#plain_short_display ⇒ Object
51 |
# File 'lib/unittest-colorizer.rb', line 51 alias_method :plain_short_display, :short_display |
#plain_single_character_display ⇒ Object
46 |
# File 'lib/unittest-colorizer.rb', line 46 alias_method :plain_single_character_display, :single_character_display |
#short_display ⇒ Object
52 53 54 |
# File 'lib/unittest-colorizer.rb', line 52 def short_display "#{@test_name.green}: #{@message.split("\n")[0].magenta}" end |
#single_character_display ⇒ Object
47 48 49 |
# File 'lib/unittest-colorizer.rb', line 47 def single_character_display plain_single_character_display.red end |