Module: RSpec::Rake

Defined in:
lib/rspec/core/backward_compatibility.rb

Class Method Summary collapse

Class Method Details

.const_missing(name) ⇒ Object

Used to print deprecation warnings for Rake::SpecTask constant (use RSpec::Core::RakeTask instead)



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/rspec/core/backward_compatibility.rb', line 46

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