Module: Minitest

Defined in:
lib/minitest/coverage_reporter.rb,
lib/minitest/hammer_coverage_plugin.rb

Defined Under Namespace

Classes: CoverageRunner

Class Method Summary collapse

Class Method Details

.plugin_hammer_coverage_init(options) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/minitest/hammer_coverage_plugin.rb', line 11

def self.plugin_hammer_coverage_init(options)
  if options[:coverage]
    Minitest.reporter.reporters.clear
    Minitest.after_run do
        Minitest::CoverageRunner.new("test/data/#{ FOREMAN_VERSION }/foreman_api.json").run_tests
    end
  end
end

.plugin_hammer_coverage_options(opts, options) ⇒ Object



5
6
7
8
9
# File 'lib/minitest/hammer_coverage_plugin.rb', line 5

def self.plugin_hammer_coverage_options(opts, options)
  opts.on "-c", "--coverage", "Generate coverage reports for API endpoints" do
    options[:coverage] = true
  end
end