Sha256: 2fa06a32be9f065c2638ee40aa81393f5a353e93bcf5b4843d37ed0d4e4753c7

Contents?: true

Size: 319 Bytes

Versions: 14

Compression:

Stored size: 319 Bytes

Contents

class CacheMock
  
  attr_accessor :keys_stored, :keys_asked, :storage
  
  def initialize(params = {})
    @storage = {}
    @keys_stored = []
    @keys_asked = []
  end
  
  def [](key)
    @keys_asked << key
    @storage[key]
  end
  
  def []=(key, value)
    @keys_stored << key
    @storage[key] = value
  end
end

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
chuyeow-longurl-0.1.5 test/cache_mock.rb
jakimowicz-longurl-0.1.1 test/cache_mock.rb
jakimowicz-longurl-0.1.3 test/cache_mock.rb
jakimowicz-longurl-0.1.4 test/cache_mock.rb
jakimowicz-longurl-0.1.5 test/cache_mock.rb
jakimowicz-longurl-0.1.6 test/cache_mock.rb
ivey-longurl-0.1.7 test/cache_mock.rb
longurl-0.1.6 test/cache_mock.rb
longurl-0.1.0 test/cache_mock.rb
longurl-0.1.2 test/cache_mock.rb
longurl-0.1.3 test/cache_mock.rb
longurl-0.1.1 test/cache_mock.rb
longurl-0.1.4 test/cache_mock.rb
longurl-0.1.5 test/cache_mock.rb