Module: Minitest

Defined in:
lib/maxitest/vendor/rg.rb

Defined Under Namespace

Classes: RG, Runnable, Test

Class Method Summary collapse

Class Method Details

.plugin_rg_init(options) ⇒ Object

:nodoc:



39
40
41
42
43
44
45
# File 'lib/maxitest/vendor/rg.rb', line 39

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:



33
34
35
36
37
# File 'lib/maxitest/vendor/rg.rb', line 33

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