Sha256: f26e12f09724a99caf36d8539d6d8242d91b3fa8f54dc6ae0b1a813710881598

Contents?: true

Size: 750 Bytes

Versions: 17

Compression:

Stored size: 750 Bytes

Contents

RSpec.describe Mutant::Expression::Namespace::Exact do

  let(:object) { described_class.parse(input) }
  let(:env)    { Fixtures::TEST_ENV           }
  let(:input)  { 'TestApp::Literal'           }

  describe '#matcher' do
    subject { object.matcher(env) }

    it { should eql(Mutant::Matcher::Scope.new(env, TestApp::Literal, object)) }
  end

  describe '#match_length' do
    subject { object.match_length(other) }

    context 'when other is an equivalent expression' do
      let(:other) { described_class.parse(object.syntax) }

      it { should be(object.syntax.length) }
    end

    context 'when other is an unequivalent expression' do
      let(:other) { described_class.parse('Foo*') }

      it { should be(0) }
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
mutant-0.8.0 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.7.9 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.7.8 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.7.7 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.7.6 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.7.5 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.7.4 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.7.3 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.7.2 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.7.1 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.6.7 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.6.6 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.6.5 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.6.4 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.6.3 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.6.2 spec/unit/mutant/expression/namespace/flat_spec.rb
mutant-0.6.0 spec/unit/mutant/expression/namespace/flat_spec.rb