Class: Test::Unit::Error

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.



104
105
106
# File 'lib/test-unit-ext/attributes.rb', line 104

def attributes
  @attributes
end

#elapsed_timeObject

Returns the value of attribute elapsed_time.



116
117
118
# File 'lib/test-unit-ext/xml-report.rb', line 116

def elapsed_time
  @elapsed_time
end

#testObject

Returns the value of attribute test.



116
117
118
# File 'lib/test-unit-ext/xml-report.rb', line 116

def test
  @test
end

Instance Method Details

#locationObject



122
123
124
# File 'lib/test-unit-ext/xml-report.rb', line 122

def location
  filter_backtrace(@exception.backtrace)
end

#long_displayObject



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

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



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

alias_method :long_display_without_attributes, :long_display

#original_long_displayObject



19
20
21
22
23
# File 'lib/test-unit-ext/long-display-for-emacs.rb', line 19

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



118
119
120
# File 'lib/test-unit-ext/xml-report.rb', line 118

def status_name
  "error"
end