Sha256: b0777880287a7f2f3ebbceecefd49dd8c381b46d24157c6119dee37c9472fe09
Contents?: true
Size: 720 Bytes
Versions: 16
Compression:
Stored size: 720 Bytes
Contents
if defined?(Cucumber) require 'shellwords' Before('~@allow-should-syntax') do set_env('SPEC_OPTS', "-r#{Shellwords.escape(__FILE__)}") end Before('@oneliner-should') do set_env('ALLOW_ONELINER_SHOULD', 'true') end else if ENV['REMOVE_OTHER_RSPEC_LIBS_FROM_LOAD_PATH'] $LOAD_PATH.reject! { |x| /rspec-mocks/ === x || /rspec-expectations/ === x } end 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 unless ENV['ALLOW_ONELINER_SHOULD'] end end
Version data entries
16 entries across 16 versions & 2 rubygems