Sha256: 05e3328c7b9590a090a6c6a3a18247e035652487cf945cb8115ddfaa74b8ccb3

Contents?: true

Size: 725 Bytes

Versions: 5

Compression:

Stored size: 725 Bytes

Contents

# This file is designed to prevent the use of certain APIs that
# we don't want used from our cukes, since they function as documentation.

if defined?(Cucumber)
  require 'shellwords'
  tag = !defined?(::RUBY_ENGINE_VERSION) || (::RUBY_ENGINE_VERSION < '2.0.0') ? '~@allow-old-syntax' : 'not @allow-old-syntax'
  Before(tag) do
    set_environment_variable('SPEC_OPTS', "-r#{Shellwords.escape(__FILE__)}")
  end
else
  module DisallowOneLinerShould
    def should(*)
      raise "one-liner should is not allowed"
    end

    def should_not(*)
      raise "one-liner should_not is not allowed"
    end
  end

  RSpec.configure do |rspec|
    rspec.disable_monkey_patching!
    rspec.include DisallowOneLinerShould
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
opal-rspec-1.1.0.alpha3 rspec-mocks/upstream/features/support/disallow_certain_apis.rb
opal-rspec-1.1.0.alpha2 rspec-mocks/upstream/features/support/disallow_certain_apis.rb
opal-rspec-1.1.0.alpha1 rspec-mocks/upstream/features/support/disallow_certain_apis.rb
opal-rspec-1.0.0 rspec-mocks/upstream/features/support/disallow_certain_apis.rb
opal-rspec-1.0.0.alpha1 rspec-mocks/upstream/features/support/disallow_certain_apis.rb