15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/simplecov-cobertura.rb', line 15
def format(result)
xml_doc = result_to_xml result
result_path = File.join(SimpleCov.coverage_path, RESULT_FILE_NAME)
formatter = REXML::Formatters::Pretty.new
formatter.compact = true
string_io = StringIO.new
formatter.write(xml_doc, string_io)
xml_str = string_io.string
File.write(result_path, xml_str)
puts "Coverage report generated for #{result.command_name} to #{result_path}. #{coverage_output(result)}"
xml_str
end
|