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:



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

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

    self.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:



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

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