Sha256: a5dcfba822bbcc4db9b41b0cf0b785c2b9689a0b98a3d6193540316983a1199a

Contents?: true

Size: 1.33 KB

Versions: 38

Compression:

Stored size: 1.33 KB

Contents

module RSpec
  module Core
    # @private
    module ConstMissing
      # Used to print deprecation warnings for Rspec and Spec constants (use
      # RSpec instead)
      def const_missing(name)
        case name
        when :Rspec, :Spec
          RSpec.deprecate(name.to_s, :replacement => "RSpec")
          RSpec
        else
          begin
            super
          rescue Exception => e
            e.backtrace.reject! {|l| l =~ Regexp.compile(__FILE__) }
            raise e
          end
        end
      end
    end
  end

  module Runner
    # @deprecated use RSpec.configure instead.
    def self.configure(&block)
      RSpec.deprecate("Spec::Runner.configure", :replacement => "RSpec.configure")
      RSpec.configure(&block)
    end
  end

  # @private
  module Rake
    # Used to print deprecation warnings for Rake::SpecTask constant (use
    # RSpec::Core::RakeTask instead)
    def self.const_missing(name)
      case name
      when :SpecTask
        RSpec.deprecate("Spec::Rake::SpecTask", :replacement => "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

38 entries across 38 versions & 8 rubygems

Version Path
tuktuk-rails-0.0.9 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/backward_compatibility.rb
tuktuk-rails-0.0.8 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/backward_compatibility.rb
tuktuk-rails-0.0.7 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/backward_compatibility.rb
dxruby_rp5-0.0.2 spec/vendor/rspec-core-2.14.7/lib/rspec/core/backward_compatibility.rb
dxruby_rp5-0.0.1 spec/vendor/rspec-core-2.14.7/lib/rspec/core/backward_compatibility.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/backward_compatibility.rb
rspec-core-2.99.0.beta1 lib/rspec/core/backward_compatibility.rb
rspec-core-2.14.7 lib/rspec/core/backward_compatibility.rb
rspec-core-2.14.6 lib/rspec/core/backward_compatibility.rb
clickable_link-0.0.2 vendor/bundle/ruby/1.9.1/gems/rspec-core-2.14.5/lib/rspec/core/backward_compatibility.rb
syllable_counter-1.0.0 vendor/bundle/gems/rspec-core-2.14.5/lib/rspec/core/backward_compatibility.rb
rspec-core-2.14.5 lib/rspec/core/backward_compatibility.rb
rspec-core-2.14.4 lib/rspec/core/backward_compatibility.rb
rspec-core-2.14.3 lib/rspec/core/backward_compatibility.rb
rspec-core-2.14.2 lib/rspec/core/backward_compatibility.rb
rspec-core-2.14.1 lib/rspec/core/backward_compatibility.rb
rspec-core-2.14.0 lib/rspec/core/backward_compatibility.rb
rspec-core-2.14.0.rc1 lib/rspec/core/backward_compatibility.rb