Class: Spec::Runner::OptionParser
- Defined in:
- lib/lucid/rspec/disallow_options.rb
Overview
Lucid uses OptionParser in order to parse any command line options. If RSpec is being used in any way with Lucid, then what will happen is that RSpec’s option parser will kick in and try to parse ARGV. Since the command line arguments will be specific to Lucid, RSpec will not know what to do with them and will fail. So what this bit of logic is doing is making sure that the option parser for RSpec will not be operative.
Constant Summary collapse
- MODDED_RSPEC =
:nodoc:
Object.new
Class Method Summary collapse
Class Method Details
.method_added(m) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/lucid/rspec/disallow_options.rb', line 16 def self.method_added(m) unless @__modding_rspec @__modding_rspec = true define_method(m) do |*a| MODDED_RSPEC end @__modding_rspec = false end end |