Class: Test::Unit::Failure

Inherits:
Object
  • Object
show all
Includes:
AttributesFormatter, XMLReportable
Defined in:
lib/test-unit-ext/attributes.rb,
lib/test-unit-ext/xml-report.rb,
lib/test-unit-ext/long-display-for-emacs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from XMLReportable

#to_xml

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



106
107
108
# File 'lib/test-unit-ext/attributes.rb', line 106

def attributes
  @attributes
end

#elapsed_timeObject

Returns the value of attribute elapsed_time.



106
107
108
# File 'lib/test-unit-ext/xml-report.rb', line 106

def elapsed_time
  @elapsed_time
end

#testObject

Returns the value of attribute test.



106
107
108
# File 'lib/test-unit-ext/xml-report.rb', line 106

def test
  @test
end

Instance Method Details

#long_displayObject



109
110
111
112
113
# File 'lib/test-unit-ext/attributes.rb', line 109

def long_display
  test_name_re = Regexp.escape(@test_name)
  long_display_without_attributes.sub(/(^#{test_name_re}.*\n)/,
                                      "\\1#{format_attributes}")
end

#long_display_without_attributesObject



108
# File 'lib/test-unit-ext/attributes.rb', line 108

alias_method :long_display_without_attributes, :long_display

#original_long_displayObject



8
9
10
11
12
# File 'lib/test-unit-ext/long-display-for-emacs.rb', line 8

def long_display
  test_name_re = Regexp.escape(@test_name)
  long_display_without_attributes.sub(/(^#{test_name_re}.*\n)/,
                                      "\\1#{format_attributes}")
end

#status_nameObject



108
109
110
# File 'lib/test-unit-ext/xml-report.rb', line 108

def status_name
  "failure"
end