Sha256: ddd283012e635b4cadbc7e0b530dcdf6089abcb9769677a9109bdd6515feddc1

Contents?: true

Size: 627 Bytes

Versions: 25

Compression:

Stored size: 627 Bytes

Contents

RSpec.describe Mutant::Context::Scope, '#unqualified_name' do
  subject { object.unqualified_name }

  let(:path)   { double('Path') }

  context 'with top level constant name' do
    let(:object) { described_class.new(TestApp, path) }

    it 'should return the unqualified name' do
      should eql('TestApp')
    end

    it_should_behave_like 'an idempotent method'
  end

  context 'with scoped constant name' do
    let(:object) { described_class.new(TestApp::Literal, path) }

    it 'should return the unqualified name' do
      should eql('Literal')
    end

    it_should_behave_like 'an idempotent method'
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
mutant-0.8.8 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.8.7 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.8.6 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.8.5 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.8.4 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.8.3 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.8.2 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.8.1 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.8.0 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.7.9 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.7.8 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.7.7 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.7.6 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.7.5 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.7.4 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.7.3 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.7.2 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.7.1 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.6.7 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.6.6 spec/unit/mutant/context/scope/unqualified_name_spec.rb