Class: MutationTester::Reporters::HtmlReporter

Inherits:
BaseReporter
  • Object
show all
Includes:
ERB::Util
Defined in:
lib/mutation_tester/reporters/html_reporter.rb

Constant Summary collapse

STATUS_SORT_ORDER =
%i[survived killed timeout stillborn error].freeze

Instance Attribute Summary

Attributes inherited from BaseReporter

#config, #results, #source_file, #spec_file

Instance Method Summary collapse

Methods inherited from BaseReporter

#initialize, #interrupted?, score, status_for

Constructor Details

This class inherits a constructor from MutationTester::Reporters::BaseReporter

Instance Method Details

#generateObject



8
9
10
11
12
13
# File 'lib/mutation_tester/reporters/html_reporter.rb', line 8

def generate
  output_file = File.join(@config.output_dir, 'mutation_report.html')
  html_content = ERB.new(template).result(binding)
  File.write(output_file, html_content)
  puts Rainbow("✓ HTML report saved to: #{output_file}").green
end