module Minitest

typed: strict

typed: strict

typed: strict

typed: strict

typed: strict

typed: strict

typed: strict

typed: strict

typed: strict

typed: strict

typed: strict

typed: strict

typed: strict

typed: strict

typed: strict

typed: true

Public Class Methods

plugin_distributed_init(options) click to toggle source
# File lib/minitest/distributed_plugin.rb, line 18
def plugin_distributed_init(options)
  return if options[:disable_distributed]

  Minitest.singleton_class.prepend(Minitest::Distributed::TestRunnerPatch)

  remove_reporter(::Rails::TestUnitReporter) if defined?(::Rails::TestUnitReporter)
  remove_reporter(Minitest::ProgressReporter)
  remove_reporter(Minitest::SummaryReporter)

  options[:distributed].coordinator.register_reporters(reporter: reporter, options: options)

  reporter << Minitest::Distributed::Reporters::DistributedPogressReporter.new(options[:io], options)
  reporter << Minitest::Distributed::Reporters::DistributedSummaryReporter.new(options[:io], options)
end
plugin_distributed_options(opts, options) click to toggle source
# File lib/minitest/distributed_plugin.rb, line 10
def plugin_distributed_options(opts, options)
  opts.on("--disable-distributed", "Disable the distributed plugin") do
    options[:disable_distributed] = true
  end

  options[:distributed] = Minitest::Distributed::Configuration.from_command_line_options(opts, options)
end
plugin_junitxml_init(options) click to toggle source
# File lib/minitest/junitxml_plugin.rb, line 14
def plugin_junitxml_init(options)
  return if options[:junitxml].nil?

  require "minitest/distributed/reporters/junitxml_reporter"
  reporter << Minitest::Distributed::Reporters::JUnitXMLReporter.new(options[:io], options)
end
plugin_junitxml_options(opts, options) click to toggle source
# File lib/minitest/junitxml_plugin.rb, line 6
def plugin_junitxml_options(opts, options)
  options[:junitxml] = ENV["MINITEST_JUNITXML"]

  opts.on("--junitxml=PATH", "Generate a JUnitXML report at the specified path") do |path|
    options[:junitxml] = path
  end
end

Private Class Methods

remove_reporter(reporter_class) click to toggle source
# File lib/minitest/distributed_plugin.rb, line 35
def remove_reporter(reporter_class)
  reporter.reporters.reject! { |reporter| reporter.is_a?(reporter_class) }
end