Sha256: 432ecd3fd3235869ce988dcd4fefba4286300c7cf11c16d21bda223d910c93aa

Contents?: true

Size: 779 Bytes

Versions: 4

Compression:

Stored size: 779 Bytes

Contents

require 'spec_helper'

describe RSpec::Core::Pending do
  describe 'PendingDeclaredInExample' do
    before { allow_deprecation }

    it 'is an alternate reference to SkipDeclaredInExample' do
      expect(::RSpec::Core::Pending::PendingDeclaredInExample).to \
        be(::RSpec::Core::Pending::SkipDeclaredInExample)
    end

    it 'prints a deprecation warning' do
      expect_deprecation_with_call_site(
        __FILE__,
        __LINE__ + 3,
        /PendingDeclaredInExample/
      )
      ::RSpec::Core::Pending::PendingDeclaredInExample
    end

    specify 'the const_missing hook raises for other undefined constants' do
      expect {
        ::RSpec::Core::Pending::SomeUndefinedConst
      }.to raise_error(NameError, /uninitialized constant/)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rspec-core-2.99.2 spec/rspec/core/pending_spec.rb
rspec-core-2.99.1 spec/rspec/core/pending_spec.rb
rspec-core-2.99.0 spec/rspec/core/pending_spec.rb
rspec-core-2.99.0.rc1 spec/rspec/core/pending_spec.rb