Module: Minitest

Defined in:
lib/minitest/ci_plugin.rb

Defined Under Namespace

Classes: Ci

Class Method Summary collapse

Class Method Details

.plugin_ci_init(options) ⇒ Object


29
30
31
32
33
# File 'lib/minitest/ci_plugin.rb', line 29

def self.plugin_ci_init options
  if Ci.report?
    self.reporter << Ci.new(options[:io], options)
  end
end

.plugin_ci_options(opts, options) ⇒ Object


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/minitest/ci_plugin.rb', line 7

def self.plugin_ci_options opts, options
  opts.on "--ci-report", "Enable Minitest::Ci Reporting." do |dir|
    Ci.report!
  end

  opts.on "--ci-dir DIR", "Set the CI report dir. Default to #{Ci.report_dir}" do |dir|
    options[:ci_dir] = dir
  end

  opts.on "--[no-]ci-clean", "Clean the CI report dir in between test runs. Default #{Ci.clean}" do |clean|
    options[:ci_clean] = clean
  end

  opts.on "--working-dir DIR", "Set the working dir. Default to #{Ci.working_dir}" do |dir|
    options[:working_dir] = dir
  end

  opts.on "--report-name REPORT_NAME_OPTION", "Set report name option. Default to :test_name" do |report_name_option|
    options[:report_name] = report_name_option
  end
end