Module: Minitest

Defined in:
lib/minitap/minitest5.rb,
lib/minitest/minitap_plugin.rb

Overview

Becuase of some wierdness in MiniTest debug, $DEBUG = $DEBUG, false require ‘minitest/unit’ $DEBUG = debug

Defined Under Namespace

Classes: Minitap, TapJ, TapY, TestResult

Class Method Summary collapse

Class Method Details

.plugin_minitap_init(options) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/minitest/minitap_plugin.rb', line 24

def self.plugin_minitap_init(options)
  if options[:minitap]
    require 'minitap/minitest5'

    self.reporter.reporters.clear

    case options[:minitap] || ENV['rpt']
    when 'tapj'
      self.reporter << TapJ.new(options)
    when 'tapy'
      self.reporter << TapY.new(options)
    end
  end
end

.plugin_minitap_options(opts, options) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/minitest/minitap_plugin.rb', line 4

def self.plugin_minitap_options(opts, options)
  opts.on "--tapy", "Use TapY reporter." do
    options[:minitap] = 'tapy'
  end

  opts.on "--tapj", "Use TapJ reporter." do
    options[:minitap] = 'tapj'
  end

  # DEPRECATED Thanks to minitest-reporter-api gem.
  #unless options[:minitap]
  #  if defined?(Minitest::TapY) && self.reporter == Minitest::TapY
  #    options[:minitap] = 'tapy'
  #  elsif defined?(Minitest::TapJ) && self.reporter == Minitest::TapJ
  #    options[:minitap] = 'tapj'
  #  end
  #end
end