Module: Minitest

Defined in:
lib/minitest/rg_plugin.rb

Defined Under Namespace

Classes: RG

Class Method Summary collapse

Class Method Details

.plugin_rg_init(options) ⇒ Object

:nodoc:



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

def self.plugin_rg_init options # :nodoc:
  return unless RG.rg?

  io = RG.new options[:io]

  reporter.reporters.grep(Minitest::Reporter).each { |rep| rep.io = io }
end

.plugin_rg_options(opts, _options) ⇒ Object

:nodoc:



6
7
8
9
10
# File 'lib/minitest/rg_plugin.rb', line 6

def self.plugin_rg_options opts, _options # :nodoc:
  opts.on "--[no-]rg", "Add red/green to test output." do |bool|
    RG.rg! color: bool
  end
end