Sha256: ee52b0ec9ecb5543961accb9bdba6095d31f6c6e831cc2e8b80ef9076bbc18ae
Contents?: true
Size: 904 Bytes
Versions: 5
Compression:
Stored size: 904 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-disallowed-api': 'not @allow-disallowed-api' 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.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
5 entries across 5 versions & 1 rubygems