Sha256: dd492b1ebebf8848fa59310e57423e829ded5c85f8c73e1ffc14b69271241f86

Contents?: true

Size: 404 Bytes

Versions: 5

Compression:

Stored size: 404 Bytes

Contents

module IdentityMapMatcher
  class BeInIdentityMap
    def matches?(obj)
      @obj = obj
      @obj.identity_map[@obj.id] == @obj
    end

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

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

  def be_in_identity_map
    BeInIdentityMap.new
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
toystore-0.8.3 spec/support/identity_map_matcher.rb
toystore-0.8.2 spec/support/identity_map_matcher.rb
toystore-0.8.1 spec/support/identity_map_matcher.rb
toystore-0.8.0 spec/support/identity_map_matcher.rb
toystore-0.7.0 spec/support/identity_map_matcher.rb