Sha256: e87d1fdbefb50614dc88c043e9f90301a24013f9871e94c169367fe0b014ea1a

Contents?: true

Size: 603 Bytes

Versions: 126

Compression:

Stored size: 603 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

126 entries across 124 versions & 19 rubygems

Version Path
aslakhellesoy-cucumber-0.3.100 lib/cucumber/rspec_neuter.rb
aslakhellesoy-cucumber-0.3.101.2 lib/cucumber/rspec_neuter.rb
aslakhellesoy-cucumber-0.3.101 lib/cucumber/rspec_neuter.rb
aslakhellesoy-cucumber-0.3.102.1 lib/cucumber/rspec_neuter.rb
aslakhellesoy-cucumber-0.3.102.2 lib/cucumber/rspec_neuter.rb
aslakhellesoy-cucumber-0.3.102 lib/cucumber/rspec_neuter.rb
aslakhellesoy-cucumber-0.3.103 lib/cucumber/rspec_neuter.rb
aslakhellesoy-cucumber-0.3.104 lib/cucumber/rspec_neuter.rb
aslakhellesoy-cucumber-0.3.97 lib/cucumber/rspec_neuter.rb
aslakhellesoy-cucumber-0.3.98 lib/cucumber/rspec_neuter.rb
aslakhellesoy-cucumber-0.3.99 lib/cucumber/rspec_neuter.rb
dwaite-cucumber-0.3.101 lib/cucumber/rspec_neuter.rb
engineyard-cucumber-0.3.101 lib/cucumber/rspec_neuter.rb
kosmas58-cucumber-0.3.100 lib/cucumber/rspec_neuter.rb
kosmas58-cucumber-0.3.102 lib/cucumber/rspec_neuter.rb
kosmas58-cucumber-0.3.103 lib/cucumber/rspec_neuter.rb
kosmas58-cucumber-0.3.97 lib/cucumber/rspec_neuter.rb
kosmas58-cucumber-0.3.98 lib/cucumber/rspec_neuter.rb
kosmas58-cucumber-0.3.99 lib/cucumber/rspec_neuter.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/rspec/disable_option_parser.rb