lib/teaspoon/coverage.rb in teaspoon-0.8.0 vs lib/teaspoon/coverage.rb in teaspoon-0.9.0

- old
+ new

@@ -1,19 +1,18 @@ module Teaspoon class Coverage - def initialize(suite_name, config_name, data) @suite_name = suite_name @data = data @executable = Teaspoon::Instrumentation.executable @config = coverage_configuration(config_name.to_s) end def generate_reports(&block) input_path do |input| results = [] - for format in @config.reports + @config.reports.each do |format| result = generate_report(input, format) results << result if ["text", "text-summary"].include?(format.to_s) end block.call(results.join("\n\n")) unless results.blank? end @@ -46,10 +45,10 @@ end end def generate_report(input, format) output_path = File.join(@config.output_path, @suite_name) - result = %x{#{@executable} report #{format} #{input.shellescape} --dir #{output_path} 2>&1} + result = %x{#{@executable} report --include=#{input.shellescape} --dir #{output_path} #{format} 2>&1} return result.gsub("Done", "").gsub("Using reporter [#{format}]", "").strip if $?.exitstatus == 0 raise Teaspoon::DependencyFailure, "Could not generate coverage report for #{format}" end def threshold_args