Module: Minitest

Defined in:
lib/minitest/top_tests_plugin.rb

Defined Under Namespace

Classes: TopTestReporter

Class Method Summary collapse

Class Method Details

.plugin_top_tests_init(options) ⇒ Object



2
3
4
# File 'lib/minitest/top_tests_plugin.rb', line 2

def self.plugin_top_tests_init(options)
  self.reporter << TopTestReporter.new(options)
end

.plugin_top_tests_options(opts, options) ⇒ Object



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

def self.plugin_top_tests_options(opts, options)
  opts.on "--max-time=ms", "Test fails if it exceeds specified time in seconds" do |max_time|
    options[:max_time] = max_time.to_f
  end
end