Sha256: 71f15bca839cfb19c66005a9a1b51509557ea76339443a36802b8f2de247bda8

Contents?: true

Size: 419 Bytes

Versions: 11

Compression:

Stored size: 419 Bytes

Contents

module IdentityMapMatcher
  class BeInIdentityMap
    def matches?(object)
      @object = object
      Toy::IdentityMap.include?(@object)
    end

    def failure_message
      "expected #{@object} to be in identity map, but it was not"
    end

    def negative_failure_message
      "expected #{@object} to not be in identity map, but it was"
    end
  end

  def be_in_identity_map
    BeInIdentityMap.new
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
toystore-0.13.2 spec/support/identity_map_matcher.rb
toystore-0.13.1 spec/support/identity_map_matcher.rb
toystore-0.13.0 spec/support/identity_map_matcher.rb
toystore-0.12.0 spec/support/identity_map_matcher.rb
toystore-0.11.0 spec/support/identity_map_matcher.rb
toystore-0.10.4 spec/support/identity_map_matcher.rb
toystore-0.10.3 spec/support/identity_map_matcher.rb
toystore-0.10.2 spec/support/identity_map_matcher.rb
toystore-0.10.1 spec/support/identity_map_matcher.rb
toystore-0.10.0 spec/support/identity_map_matcher.rb
toystore-0.9.0 spec/support/identity_map_matcher.rb