Sha256: 7eb3f6a4ba457a2e12f99345443e1a95f1e3e90b4879128a465c2f8bf70e3d69

Contents?: true

Size: 644 Bytes

Versions: 1

Compression:

Stored size: 644 Bytes

Contents

require 'spec_helper'
require 'riedi/storage'

describe Riedi::Storage do
  before do
    @storage = Riedi::Storage.new
    @storage.flushall
    @storage.set("key", "value")
  end

  it "status" do
    @storage.status.should eql("OK")
  end

  it "keys" do
    @storage.keys.should eql(["key"])
  end

  it "set" do
    @storage.set("key", "test").should eql("OK")
  end

  it "get" do
    @storage.get("key").should eql("value")
  end

  it "get missing" do
    @storage.get("missing").should eql(nil)
  end

  it "del" do
    @storage.del("key").should eql(1)
  end

  it "del missing" do
    @storage.del("missing").should eql(0)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
riedi-0.0.1 spec/riedi/storage_spec.rb