Sha256: fbbfbf88dd2cf2150b9084629e4e1416743a55d622f18988063fb1e562363346

Contents?: true

Size: 642 Bytes

Versions: 25

Compression:

Stored size: 642 Bytes

Contents

require 'spec_helper'

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

  let(:path)   { mock('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.3.0.beta13 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.3.0.beta12 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.3.0.beta11 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.3.0.beta10 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.3.0.beta9 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.3.0.beta8 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.3.0.beta7 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.3.0.beta6 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.3.0.beta5 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.3.0.beta4 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.3.0.beta3 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.3.0.beta2 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.2.20 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.2.17 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.2.16 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.2.15 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.2.14 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.2.13 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.2.12 spec/unit/mutant/context/scope/unqualified_name_spec.rb
mutant-0.2.11 spec/unit/mutant/context/scope/unqualified_name_spec.rb