Sha256: 95f4e2f67c673d8a7c65638dd6c7ff27925b7a7abe6e289ef22e35c77d4eb3d8

Contents?: true

Size: 596 Bytes

Versions: 9

Compression:

Stored size: 596 Bytes

Contents

RSpec.describe Mutant::Matcher::Compiler::SubjectPrefix, '#call' do
  let(:object)   { described_class.new(parse_expression('Foo*')) }

  let(:_subject) do
    instance_double(
      Mutant::Subject,
      expression: parse_expression(subject_expression)
    )
  end

  subject { object.call(_subject) }

  context 'when subject expression is prefixed by expression' do
    let(:subject_expression) { 'Foo::Bar' }

    it { should be(true) }
  end

  context 'when subject expression is NOT prefixed by expression' do
    let(:subject_expression) { 'Bar' }

    it { should be(false) }
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mutant-0.8.16 spec/unit/mutant/matcher/compiler/subject_prefix_spec.rb
mutant-0.8.15 spec/unit/mutant/matcher/compiler/subject_prefix_spec.rb
mutant-0.8.14 spec/unit/mutant/matcher/compiler/subject_prefix_spec.rb
mutant-0.8.13 spec/unit/mutant/matcher/compiler/subject_prefix_spec.rb
mutant-0.8.12 spec/unit/mutant/matcher/compiler/subject_prefix_spec.rb
mutant-0.8.11 spec/unit/mutant/matcher/compiler/subject_prefix_spec.rb
mutant-0.8.10 spec/unit/mutant/matcher/compiler/subject_prefix_spec.rb
mutant-0.8.9 spec/unit/mutant/matcher/compiler/subject_prefix_spec.rb
mutant-0.8.8 spec/unit/mutant/matcher/compiler/subject_prefix_spec.rb