Sha256: 6630110979d7465c523fb6d526db371f2ec6545bdd8ef8e58ab130999645d5a7

Contents?: true

Size: 536 Bytes

Versions: 18

Compression:

Stored size: 536 Bytes

Contents

require 'spec_helper'

describe Mutant::Matcher::ObjectSpace, '.parse' do
  subject { object.parse(input) }

  let(:object) { described_class }

  let(:matcher) { mock('Matcher') }

  context 'with valid notation' do
    let(:input) { '::TestApp::Literal' }

    it 'should return matcher' do
      described_class.should_receive(:new).with(%r(\ATestApp::Literal(\z|::))).and_return(matcher)
      should be(matcher)
    end
  end

  context 'with invalid notation' do
    let(:input) { 'TestApp' }

    it { should be(nil) }
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
mutant-0.2.20 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.17 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.16 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.15 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.14 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.13 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.12 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.11 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.9 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.8 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.7 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.6 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.5 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.4 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.3 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.2 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.1 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb
mutant-0.2.0 spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb