Class: SimpleCov::Formatter::CoberturaFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/simplecov-cobertura.rb

Constant Summary collapse

RESULT_FILE_NAME =
'results.xml'

Instance Method Summary collapse

Instance Method Details

#format(result) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/simplecov-cobertura.rb', line 6

def format(result)
  xml = result_to_xml result
  
  result_path = File.join( SimpleCov.coverage_path, RESULT_FILE_NAME )
  File.write(result_path, xml)
  
  puts "Coverage report generated for #{result.command_name} to #{result_path}"
  
  return xml
end