Sha256: ab2ccafd008260385d897f024906ec6abceb54632cb016c439eda326ad503c9d

Contents?: true

Size: 360 Bytes

Versions: 10

Compression:

Stored size: 360 Bytes

Contents

require './lib/couchpillow.rb'


class FakeCouchbaseServer

  def initialize
    @storage = {}
  end


  def set id, data
    @storage[id] = data
  end


  def delete id
    @storage.delete(id)
  end


  def replace id, data
    @storage.has_key?(id) or raise "Document does not exist"
    @storage[id] = data
  end


  def get id
    @storage[id]
  end
end


Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
couchpillow-0.3.10 test/helper.rb
couchpillow-0.3.9 test/helper.rb
couchpillow-0.3.8 test/helper.rb
couchpillow-0.3.7 test/helper.rb
couchpillow-0.3.6 test/helper.rb
couchpillow-0.3.5 test/helper.rb
couchpillow-0.3.4 test/helper.rb
couchpillow-0.3.3 test/helper.rb
couchpillow-0.3.2 test/helper.rb
couchpillow-0.3.1 test/helper.rb