module RSpec::Mocks::Deprecation

Public Instance Methods

deprecate(deprecated, options={}) click to toggle source

@private

Used internally to print deprecation warnings

# File lib/rspec/mocks/deprecation.rb, line 7
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