Sha256: b6c764529c122eb380bcdb03059978553c7e61c09b263d84060dd55353d9cd75

Contents?: true

Size: 597 Bytes

Versions: 51

Compression:

Stored size: 597 Bytes

Contents

require 'optparse'

module Spec #:nodoc:
  module Runner #:nodoc:
    # Neuters RSpec's option parser.
    # (RSpec's option parser tries to parse ARGV, which
    # will fail when running cucumber)
    class OptionParser < ::OptionParser #:nodoc:
      NEUTERED_RSPEC = Object.new
      def NEUTERED_RSPEC.method_missing(m, *args); self; end

      def self.method_added(m)
        unless @__neutering_rspec
          @__neutering_rspec = true
          define_method(m) do |*a|
            NEUTERED_RSPEC
          end
          @__neutering_rspec = false
        end
      end
    end
  end
end

Version data entries

51 entries across 49 versions & 3 rubygems

Version Path
cucumber-2.99.0 lib/cucumber/rspec/disable_option_parser.rb
mobiusloop-0.1.5 lib/cucumber/rspec/disable_option_parser.rb
cucumber-2.4.0 lib/cucumber/rspec/disable_option_parser.rb
mobiusloop-0.1.3 lib/cucumber/rspec/disable_option_parser.rb
mobiusloop-0.1.2 lib/cucumber/rspec/disable_option_parser.rb
cucumber-2.3.3 lib/cucumber/rspec/disable_option_parser.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/cucumber-1.3.18/lib/cucumber/rspec/disable_option_parser.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/cucumber-1.3.18/lib/cucumber/rspec/disable_option_parser.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/cucumber-1.3.16/lib/cucumber/rspec/disable_option_parser.rb
cucumber-2.3.2 lib/cucumber/rspec/disable_option_parser.rb
cucumber-2.3.1 lib/cucumber/rspec/disable_option_parser.rb
cucumber-2.3.0 lib/cucumber/rspec/disable_option_parser.rb
cucumber-2.2.0 lib/cucumber/rspec/disable_option_parser.rb
cucumber-2.1.0 lib/cucumber/rspec/disable_option_parser.rb
cucumber-2.0.2 lib/cucumber/rspec/disable_option_parser.rb
cucumber-2.0.1 lib/cucumber/rspec/disable_option_parser.rb
cucumber-1.3.20 lib/cucumber/rspec/disable_option_parser.rb
cucumber-2.0.0 lib/cucumber/rspec/disable_option_parser.rb
cucumber-2.0.0.rc.5 lib/cucumber/rspec/disable_option_parser.rb
cucumber-1.3.19 lib/cucumber/rspec/disable_option_parser.rb