Class: Spec::Runner::OptionParser
- Inherits:
-
OptionParser
- Object
- OptionParser
- Spec::Runner::OptionParser
- Defined in:
- lib/cucumber/rspec/disable_option_parser.rb
Overview
Neuters RSpec’s option parser. (RSpec’s option parser tries to parse ARGV, which will fail when running cucumber)
Constant Summary collapse
- NEUTERED_RSPEC =
:nodoc:
Object.new
Class Method Summary collapse
Class Method Details
.method_added(method) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/cucumber/rspec/disable_option_parser.rb', line 16 def self.method_added(method) return if @__neutering_rspec @__neutering_rspec = true define_method(method) do |*_a| NEUTERED_RSPEC end @__neutering_rspec = false super end |