Module: Minitest

Defined in:
lib/minitest/nyan_cat_plugin.rb

Defined Under Namespace

Classes: NyanCat

Class Method Summary collapse

Class Method Details

.plugin_nyan_cat_init(options) ⇒ Object



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

def self.plugin_nyan_cat_init(options)
  if NyanCat.nyan? then
    io = NyanCat.new options[:io]

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

.plugin_nyan_cat_options(opts, _options) ⇒ Object



5
6
7
8
9
# File 'lib/minitest/nyan_cat_plugin.rb', line 5

def self.plugin_nyan_cat_options(opts, _options)
  opts.on "-nyan", "--nyancat", "Nyan nyan nyan nyan nyan nyan nyan nyan nyan" do
    NyanCat.nyan!
  end
end