Sha256: 4c7d8f1dae5ed2716998041fb9478f689d2e80043d3cf21320526ca708e827a0
Contents?: true
Size: 1.21 KB
Versions: 203
Compression:
Stored size: 1.21 KB
Contents
module RSpec unless respond_to?(:deprecate) class << self # Used internally by RSpec to display standard deprecation warnings. # This is also defined in rspec-core, but we can't assume it's loaded # since rspec-expectations should be usable w/o rspec-core. def deprecate(method, alternate_method=nil, version=nil) version_string = version ? "rspec-#{version}" : "a future version of RSpec" message = <<-NOTICE ***************************************************************** DEPRECATION WARNING: you are using deprecated behaviour that will be removed from #{version_string}. #{caller(0)[2]} * #{method} is deprecated. NOTICE if alternate_method message << <<-ADDITIONAL * please use #{alternate_method} instead. ADDITIONAL end message << "*****************************************************************" warn_deprecation(message) end # Used internally by RSpec to display custom deprecation warnings. This # is also defined in rspec-core, but we can't assume it's loaded since # rspec-expectations should be usable w/o rspec-core. def warn_deprecation(message) send :warn, message end end end end
Version data entries
203 entries across 102 versions & 15 rubygems