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
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/lib/rspec/core/backward_compatibility.rb
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/lib/rspec/core/backward_compatibility.rb
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/lib/rspec/core/backward_compatibility.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/lib/rspec/core/backward_compatibility.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/lib/rspec/core/backward_compatibility.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/lib/rspec/core/backward_compatibility.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/lib/rspec/core/backward_compatibility.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/lib/rspec/core/backward_compatibility.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/rspec-core-2.14.8/lib/rspec/core/backward_compatibility.rb
rspec-core-2.99.2 lib/rspec/core/backward_compatibility.rb
dxruby_rp5-0.0.4 spec/vendor/rspec-core-2.14.7/lib/rspec/core/backward_compatibility.rb
rspec-core-2.99.1 lib/rspec/core/backward_compatibility.rb
rspec-core-2.99.0 lib/rspec/core/backward_compatibility.rb
rspec-core-2.99.0.rc1 lib/rspec/core/backward_compatibility.rb
rspec-core-2.14.8 lib/rspec/core/backward_compatibility.rb
rspec-core-2.99.0.beta2 lib/rspec/core/backward_compatibility.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/rspec-core-2.14.7/lib/rspec/core/backward_compatibility.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/backward_compatibility.rb
dxruby_rp5-0.0.3 spec/vendor/rspec-core-2.14.7/lib/rspec/core/backward_compatibility.rb
tuktuk-rails-0.0.10 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/backward_compatibility.rb