Class: Test::Unit::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/test/unit/error_xml.rb

Instance Method Summary collapse

Instance Method Details

#xml_elementObject



7
8
9
10
11
12
# File 'lib/test/unit/error_xml.rb', line 7

def xml_element
  element = REXML::Element.new('error')
  element.add_attributes('type' => exception.class.name, 'message' => exception.message)
  element.text = exception.backtrace.join("\n")
  element
end