Sha256: 9132bb45f3e4345edd5a567b9b4d6657859e37c747ad5b80228d0e2c6ade683a

Contents?: true

Size: 642 Bytes

Versions: 5

Compression:

Stored size: 642 Bytes

Contents

require 'spec_helper'

module FakeRedis
  describe "ServerMethods" do

    before(:each) do
      @client = FakeRedis::Redis.new
    end

    it "should return the number of keys in the selected database" do
      @client.set("key1", "1")
      @client.set("key2", "2")
      @client.set("key2", "two")

      @client.dbsize.should == 2
    end

    it "should get debugging information about a key" do
      @client.set("key1", "1")

      @client.debug_object("key1").should == "1".inspect
    end

    it "should get information and statistics about the server" do
      @client.info.key?("redis_version").should == true
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fakeredis-0.1.4 spec/server_spec.rb
fakeredis-0.1.3 spec/server_spec.rb
fakeredis-0.1.2 spec/server_spec.rb
fakeredis-0.1.1 spec/server_spec.rb
fakeredis-0.1.0 spec/server_spec.rb