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.



119
120
121
# File 'lib/test-unit-ext/attributes.rb', line 119

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



122
123
124
125
126
# File 'lib/test-unit-ext/attributes.rb', line 122

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



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

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