Module: MiniTest

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

Overview

Defined Under Namespace

Classes: RG

Class Method Summary collapse

Class Method Details

.plugin_rg_init(options) ⇒ Object

:nodoc:



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

def self.plugin_rg_init options # :nodoc:
  if RG.rg?
    io = RG.new options[:io]

    reporter.reporters.grep(Minitest::Reporter).each do |rep|
      rep.io = io if rep.io.tty?
    end
  end
end

.plugin_rg_options(opts, _options) ⇒ Object

:nodoc:



30
31
32
33
34
# File 'lib/maxitest/vendor/rg.rb', line 30

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