Sha256: 3ee3b0921d9b0090069662e4bc6a317537cb4ccca56ba7f90e5b36cf53d58536

Contents?: true

Size: 476 Bytes

Versions: 8

Compression:

Stored size: 476 Bytes

Contents

require 'spec_helper'

module FakeRedis
  describe "ServerMethods" do

    before(:each) do
      @client = 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 information and statistics about the server" do
      @client.info.key?("redis_version").should == true
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fakeredis-0.4.1 spec/server_spec.rb
fakeredis-0.4.0 spec/server_spec.rb
fakeredis-0.3.2 spec/server_spec.rb
fakeredis-0.3.1 spec/server_spec.rb
fakeredis-0.3.0 spec/server_spec.rb
fakeredis-0.2.2 spec/server_spec.rb
fakeredis-0.2.1 spec/server_spec.rb
fakeredis-0.2.0 spec/server_spec.rb