class Minitest::Reporters::HtmlReporter
def initialize(args = {})
:mode - Useful for debugging, :terse suppresses errors and is the default, :verbose lets errors bubble up
:erb_template - the path to a custom ERB template, defaults to the supplied ERB template
:reports_dir - the directory the reports should be written to, defaults to 'test/html_reports'
:title - the title that will be used in the report, defaults to 'Test Results'
The constructor takes a hash, and uses the following keys:
def initialize(args = {}) super({}) defaults = { :title => 'Test Results', :erb_template => "#{File.dirname(__FILE__)}/../templates/index.html.erb", :reports_dir => ENV['MINITEST_HTML_REPORTS_DIR'] || 'test/html_reports', :mode => :safe, :output_filename => ENV['MINITEST_HTML_REPORTS_FILENAME'] || 'index.html', } settings = defaults.merge(args) @mode = settings[:mode] @title = settings[:title] @erb_template = settings[:erb_template] @output_filename = settings[:output_filename] reports_dir = settings[:reports_dir] @reports_path = File.absolute_path(reports_dir) end