lib/spout/commands/coverage.rb in spout-0.8.0.beta11 vs lib/spout/commands/coverage.rb in spout-0.8.0.beta12
- old
+ new
@@ -27,10 +27,12 @@
run_coverage_report!
end
def run_coverage_report!
+ puts "Generating: index.html\n\n"
+
@matching_results = []
@subject_loader.all_methods.each do |method, csv_files|
scr = Spout::Models::CoverageResult.new(method, @subjects.collect(&method.to_sym).uniq)
@matching_results << [ csv_files, method, scr ]
@@ -55,11 +57,9 @@
end
coverage_folder = File.join(Dir.pwd, 'coverage')
FileUtils.mkpath coverage_folder
coverage_file = File.join(coverage_folder, 'index.html')
-
- print "\nGenerating: index.html\n\n"
File.open(coverage_file, 'w+') do |file|
erb_location = File.join( File.dirname(__FILE__), '../views/index.html.erb' )
file.puts ERB.new(File.read(erb_location)).result(binding)
end