Sha256: c1356c328a4d1cbe398bc24d51a520148e7795fa72a5efd91246d1bd772f5449

Contents?: true

Size: 775 Bytes

Versions: 16

Compression:

Stored size: 775 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'
  Before('~@allow-disallowed-api') do
    set_env('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.expose_dsl_globally = false

    rspec.mock_with :rspec do |mocks|
      mocks.syntax = :expect
    end

    rspec.expect_with :rspec do |expectations|
      expectations.syntax = :expect
    end

    rspec.include DisallowOneLinerShould
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
opal-rspec-0.8.0 rspec-expectations/upstream/features/support/disallow_certain_apis.rb
opal-rspec-0.8.0.alpha3 rspec-expectations/upstream/features/support/disallow_certain_apis.rb
opal-rspec-0.8.0.alpha2 rspec-expectations/upstream/features/support/disallow_certain_apis.rb
opal-rspec-0.8.0.alpha1 rspec-expectations/upstream/features/support/disallow_certain_apis.rb
opal-rspec-0.7.1 rspec-expectations/upstream/features/support/disallow_certain_apis.rb
opal-rspec-0.7.0 rspec-expectations/upstream/features/support/disallow_certain_apis.rb
opal-rspec-0.6.2 rspec-expectations/features/support/disallow_certain_apis.rb
opal-rspec-0.7.0.rc.2 rspec-expectations/upstream/features/support/disallow_certain_apis.rb
opal-rspec-0.6.1 rspec-expectations/features/support/disallow_certain_apis.rb
opal-rspec-0.6.0 rspec-expectations/features/support/disallow_certain_apis.rb
opal-rspec-0.6.0.beta1 rspec-expectations/features/support/disallow_certain_apis.rb
opal-connect-rspec-0.5.0 rspec-expectations/features/support/disallow_certain_apis.rb
opal-rspec-0.5.0 rspec-expectations/features/support/disallow_certain_apis.rb
opal-rspec-0.5.0.beta3 rspec-expectations/features/support/disallow_certain_apis.rb
opal-rspec-0.5.0.beta2 rspec-expectations/features/support/disallow_certain_apis.rb
opal-rspec-0.5.0.beta1 rspec-expectations/features/support/disallow_certain_apis.rb