Sha256: 1170ba89a6ca0410791816d7c5c4cf9eabab566fd54d8d292e17a430b6911e28

Contents?: true

Size: 694 Bytes

Versions: 20

Compression:

Stored size: 694 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Mutant::Expression::Namespace::Exact do
  let(:object) { parse_expression(input) }
  let(:input)  { 'TestApp::Literal'      }

  describe '#matcher' do
    subject { object.matcher }

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

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

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

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

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

      it { should be(0) }
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
mutant-0.9.11 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.9.10 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.9.9 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.9.8 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.9.7 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.9.6 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.9.5 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.9.4 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.9.3 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.9.2 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.9.1 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.9.0 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.8.24 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.8.23 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.8.22 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.8.21 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.8.20 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.8.19 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.8.18 spec/unit/mutant/expression/namespace/exact_spec.rb
mutant-0.8.17 spec/unit/mutant/expression/namespace/exact_spec.rb