Module: Minitest

Defined in:
lib/minitest/untz_plugin.rb,
lib/minitest/untz/version.rb

Defined Under Namespace

Modules: Untz Classes: UntzIO, UntzLOL

Class Method Summary collapse

Class Method Details

.plugin_untz_init(options) ⇒ Object

:nodoc:



10
11
12
13
14
15
16
17
18
19
# File 'lib/minitest/untz_plugin.rb', line 10

def self.plugin_untz_init(options) # :nodoc:
  if UntzIO.untz?
    klass = ENV['TERM'] =~ /^xterm|-256color$/ ? UntzLOL : UntzIO
    io = klass.new options[:io]

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

.plugin_untz_options(opts, options) ⇒ Object

:nodoc:



4
5
6
7
8
# File 'lib/minitest/untz_plugin.rb', line 4

def self.plugin_untz_options(opts, options) # :nodoc:
  opts.on "-u", "--untz", "Run your tests with a beat you can dance to." do
    UntzIO.untz!
  end
end