Sha256: abd46c187b71816b912a537d83ef3db9838bce7ae719838cac22b893215a5292
Contents?: true
Size: 1.34 KB
Versions: 5
Compression:
Stored size: 1.34 KB
Contents
module RSpec module Core 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 end module Runner def self.configure(&block) RSpec.deprecate("Spec::Runner.configure", "RSpec.configure") RSpec.configure(&block) end end module Rake def self.const_missing(name) case name when :SpecTask RSpec.deprecate("Spec::Rake::SpecTask", "RSpec::Core::RakeTask") require 'rspec/core/rake_task' RSpec::Core::RakeTask else begin super rescue Exception => e e.backtrace.reject! {|l| l =~ Regexp.compile(__FILE__) } raise e end end end end end Object.extend(RSpec::Core::ConstMissing)
Version data entries
5 entries across 5 versions & 1 rubygems