Module: Minitest

Defined in:
lib/minitest/hyper/report.rb,
lib/minitest/hyper_plugin.rb,
lib/minitest/hyper/reporter.rb

Defined Under Namespace

Modules: Hyper

Class Method Summary collapse

Class Method Details

.plugin_hyper_init(options) ⇒ Object

Mandatory Minitest initializer hook Detected by Minitest.load_plugins, invoked during Minitest.init_plugins



9
10
11
12
13
# File 'lib/minitest/hyper_plugin.rb', line 9

def self.plugin_hyper_init(options)
  if Hyper.enabled?
    reporter.reporters << Hyper::Reporter.new(options[:io], options)
  end
end

.plugin_hyper_options(opts, options) ⇒ Object

Optional hook for command line params handling Invoked by Minitest.process_args



17
18
19
20
21
22
# File 'lib/minitest/hyper_plugin.rb', line 17

def self.plugin_hyper_options(opts, options)
  description = "Generate an HTML test report with Minitest::Hyper"
  opts.on "-H", "--html", description do
    Hyper.enable!
  end
end