Module: Minitest

Defined in:
lib/minitest/gcstats_plugin.rb

Defined Under Namespace

Modules: Assertions, GCStats Classes: GCStatsReporter

Class Method Summary collapse

Class Method Details

.plugin_gcstats_init(options) ⇒ Object

:nodoc:



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

def self.plugin_gcstats_init options # :nodoc:
  if @gcstats then
    require "minitest/gcstats"
    self.reporter << Minitest::GCStatsReporter.new(@gcstats)
    Minitest::Test.send :include, Minitest::GCStats
  end
end

.plugin_gcstats_options(opts, options) ⇒ Object

:nodoc:



6
7
8
9
10
# File 'lib/minitest/gcstats_plugin.rb', line 6

def self.plugin_gcstats_options opts, options # :nodoc:
  opts.on "-g", "--gcstats [N]", Integer, "Display top-N GC statistics per test." do |n|
    @gcstats = Integer(n||10)
  end
end