Sha256: 0dc3ef57f854646214d1b046d9d8fa672ec456089635b9aa74c285c50fbc7abd

Contents?: true

Size: 496 Bytes

Versions: 6

Compression:

Stored size: 496 Bytes

Contents

module RSpec
  module Expectations
    module Deprecation
      # @private
      #
      # Used internally to print deprecation warnings
      def deprecate(deprecated, options={})
        message = "DEPRECATION: #{deprecated} is deprecated."
        message << " Use #{options[:replacement]} instead." if options[:replacement]
        message << " Called from #{caller(0)[2]}."
        warn message
      end
    end
  end

  extend(Expectations::Deprecation) unless respond_to?(:deprecate)
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
clickable_link-0.0.2 vendor/bundle/ruby/1.9.1/gems/rspec-expectations-2.14.2/lib/rspec/expectations/deprecation.rb
syllable_counter-1.0.0 vendor/bundle/gems/rspec-expectations-2.14.2/lib/rspec/expectations/deprecation.rb
rspec-expectations-2.14.2 lib/rspec/expectations/deprecation.rb
rspec-expectations-2.14.1 lib/rspec/expectations/deprecation.rb
rspec-expectations-2.14.0 lib/rspec/expectations/deprecation.rb
rspec-expectations-2.14.0.rc1 lib/rspec/expectations/deprecation.rb