Module: Minitest

Defined in:
lib/minitest/junit.rb,
lib/minitest/junit_plugin.rb,
lib/minitest/junit/version.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Junit

Class Method Summary collapse

Class Method Details

.plugin_junit_init(options) ⇒ Object



18
19
20
21
22
23
# File 'lib/minitest/junit_plugin.rb', line 18

def self.plugin_junit_init(options)
  return unless options.delete :junit
  file_klass = options.delete(:file_klass) || File
  io = file_klass.new options.delete(:junit_filename) || 'report.xml', 'w'
  reporter << Junit::Reporter.new(io, options)
end

.plugin_junit_options(opts, options) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/minitest/junit_plugin.rb', line 5

def self.plugin_junit_options(opts, options)
  opts.on '--junit', 'Generate a junit xml report' do
    options[:junit] = true
  end
  opts.on '--junit-filename=OUT', 'Target output filename.'\
                                  ' Defaults to report.xml' do |out|
    options[:junit_filename] = out
  end
  opts.on '--junit-jenkins', 'Sanitize test names for Jenkins display' do
    options[:junit_jenkins] = true
  end
end