Sha256: db19ded4c5e1a6a1ea518cd898bb636d57b4e8295c3db1eae4704b3276da94b1
Contents?: true
Size: 771 Bytes
Versions: 39
Compression:
Stored size: 771 Bytes
Contents
require 'spec_helper' describe "#type(key)" do before do @key = 'mock-redis-test:type' end it "returns 'none' for no key" do @redises.type(@key).should == 'none' end it "returns 'string' for a string" do @redises.set(@key, 'stringlish') @redises.type(@key).should == 'string' end it "returns 'list' for a list" do @redises.lpush(@key, 100) @redises.type(@key).should == 'list' end it "returns 'hash' for a hash" do @redises.hset(@key, 100, 200) @redises.type(@key).should == 'hash' end it "returns 'set' for a set" do @redises.sadd(@key, 100) @redises.type(@key).should == 'set' end it "returns 'zset' for a zset" do @redises.zadd(@key, 1, 2) @redises.type(@key).should == 'zset' end end
Version data entries
39 entries across 39 versions & 2 rubygems