Module: Minitest
- Defined in:
- lib/minitest/fail_plugin.rb
Defined Under Namespace
Modules: Fail
Class Method Summary collapse
Class Method Details
.plugin_fail_init(options = {}) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/minitest/fail_plugin.rb', line 8 def self.plugin_fail_init = {} if Fail.fail? filtered_reporters = self.reporter.reporters.dup filtered_reporters.reject! {|rep| rep.is_a? ProgressReporter } filtered_reporters.each {|rep| rep.send :extend, Fail } end end |
.plugin_fail_options(opts, options) ⇒ Object
2 3 4 5 6 |
# File 'lib/minitest/fail_plugin.rb', line 2 def self. opts, opts.on "--fail", "Fail on an empty test" do Fail.fail! end end |