Class: Test::Unit::Error

Inherits:
Object
  • Object
show all
Includes:
MetadataFormatter, XMLReportable
Defined in:
lib/test-unit-ext/metadata.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

#elapsed_timeObject

Returns the value of attribute elapsed_time.



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

def elapsed_time
  @elapsed_time
end

#metadataObject

Returns the value of attribute metadata.



102
103
104
# File 'lib/test-unit-ext/metadata.rb', line 102

def 
  @metadata
end

#testObject

Returns the value of attribute test.



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

def test
  @test
end

Instance Method Details

#locationObject



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

def location
  filter_backtrace(@exception.backtrace)
end

#long_displayObject



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

def long_display
  .sub(/(^#{Regexp.escape(@test_name)}:\n)/,
                                    "\\1#{}")
end

#long_display_without_metadataObject



104
# File 'lib/test-unit-ext/metadata.rb', line 104

alias_method :long_display_without_metadata, :long_display

#original_long_displayObject



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

def long_display
  .sub(/(^#{Regexp.escape(@test_name)}:\n)/,
                                    "\\1#{}")
end

#status_nameObject



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

def status_name
  "error"
end