Sha256: 38669566985568338c6e8f35469d3b2f9b43646b75d1f4fa5bb151344baa51dc

Contents?: true

Size: 1014 Bytes

Versions: 4

Compression:

Stored size: 1014 Bytes

Contents

# Cucumber 0.7 includes Rspec::Expectations
module RSpec
  module Expectations
    module ConstMissing
      def const_missing(name)
        case name
        when :Rspec, :Spec
          RSpec.warn_deprecation <<-WARNING
*****************************************************************
DEPRECATION WARNING: you are using a deprecated constant that will
be removed from a future version of RSpec.

#{caller(0)[2]}

* #{name} is deprecated.
* RSpec is the new top-level module in RSpec-2
***************************************************************
WARNING
          RSpec
        else
          begin
            super
          rescue Exception => e
            e.backtrace.reject! {|l| l =~ Regexp.compile(__FILE__) }
            raise e
          end
        end
      end
    end

    def differ=(ignore)
      RSpec.deprecate("RSpec::Expectations.differ=(differ)", "nothing at all (diffing is now automatic and no longer configurable)")
    end
  end
end

Object.extend(RSpec::Expectations::ConstMissing)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rspec-expectations-2.6.0 lib/rspec/expectations/backward_compatibility.rb
rspec-expectations-2.6.0.rc6 lib/rspec/expectations/backward_compatibility.rb
rspec-expectations-2.6.0.rc4 lib/rspec/expectations/backward_compatibility.rb
rspec-expectations-2.6.0.rc2 lib/rspec/expectations/backward_compatibility.rb