Module: Minitest
- Defined in:
- lib/minitest/hog.rb,
lib/minitest/hog_plugin.rb
Defined Under Namespace
Modules: Hog
Classes: HogReporter, ShellPs
Class Method Summary
collapse
Class Method Details
.plugin_hog_init(options) ⇒ Object
10
11
12
13
14
15
16
17
|
# File 'lib/minitest/hog_plugin.rb', line 10
def self.plugin_hog_init(options)
if options[:max_memory]
require "minitest/hog"
self.reporter << Minitest::HogReporter.new(options[:io], options)
Minitest::Test.send :include, Minitest::Hog
end
end
|
.plugin_hog_options(opts, options) ⇒ Object
4
5
6
7
8
|
# File 'lib/minitest/hog_plugin.rb', line 4
def self.plugin_hog_options(opts, options)
opts.on "--max-memory MEM", Integer, "Report tests that use more than MEM kb." do |max_memory|
options[:max_memory] = max_memory.to_i
end
end
|