Class: Test::Unit::UI::Xml::TestRunner

Inherits:
Console::TestRunner
  • Object
show all
Defined in:
lib/test/unit/ui/xml/testrunner.rb

Instance Method Summary collapse

Instance Method Details

#finished(elapsed_time) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/test/unit/ui/xml/testrunner.rb', line 10

def finished(elapsed_time)
  super(elapsed_time)
  
  xml_path = ENV["TUXML_OUTPUT_FILE"] || "tests.xml"

  nl
  File.open(xml_path,'w') {|file| file.write(to_xml) }
  output("XML output saved: #{xml_path}")
  nl
end