Methods

Class/Module Index [+]

Quicksearch

RSpec::Expectations::Deprecation

Public Instance Methods

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

@private

Used internally to print deprecation warnings

# File lib/rspec/expectations/deprecation.rb, line 19
def deprecate(deprecated, options={})
  call_site = caller.find { |line| line !~ LIB_REGEX }

  message = "DEPRECATION: #{deprecated} is deprecated."
  message << " Use #{options[:replacement]} instead." if options[:replacement]
  message << " Called from #{call_site}."
  warn message
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.