Sha256: 9e0657b8dfe012ac91bcd9a10a0840f036436051c71eedce7bfb91306bf39eb2

Contents?: true

Size: 612 Bytes

Versions: 9

Compression:

Stored size: 612 Bytes

Contents

RSpec.describe Mutest::Matcher::Compiler::SubjectPrefix, '#call' do
  subject { object.call(_subject) }

  let(:object)   { described_class.new(parse_expression('Foo*')) }

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

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

    it { is_expected.to be(true) }
  end

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

    it { is_expected.to be(false) }
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mutest-0.0.10 spec/unit/mutest/matcher/compiler/subject_prefix_spec.rb
mutest-0.0.9 spec/unit/mutest/matcher/compiler/subject_prefix_spec.rb
mutest-0.0.8 spec/unit/mutest/matcher/compiler/subject_prefix_spec.rb
mutest-0.0.7 spec/unit/mutest/matcher/compiler/subject_prefix_spec.rb
mutest-0.0.6 spec/unit/mutest/matcher/compiler/subject_prefix_spec.rb
mutest-0.0.5 spec/unit/mutest/matcher/compiler/subject_prefix_spec.rb
mutest-0.0.4 spec/unit/mutest/matcher/compiler/subject_prefix_spec.rb
mutest-0.0.3 spec/unit/mutest/matcher/compiler/subject_prefix_spec.rb
mutest-0.0.2 spec/unit/mutest/matcher/compiler/subject_prefix_spec.rb