Sha256: 4e7213ebcb96beaaddc8c1b8a9c0d143b239a054f14821752ceb1552b3ceace8
Contents?: true
Size: 571 Bytes
Versions: 11
Compression:
Stored size: 571 Bytes
Contents
require 'spec_helper' describe "#zrank(key, member)" do before do @key = 'mock-redis-test:zrank' @redises.zadd(@key, 1, 'one') @redises.zadd(@key, 2, 'two') @redises.zadd(@key, 3, 'three') end it "returns nil if member wasn't present in the set" do @redises.zrank(@key, 'foo').should be_nil end it "returns the index of the member in the set" do @redises.zrank(@key, 'one').should == 0 @redises.zrank(@key, 'two').should == 1 @redises.zrank(@key, 'three').should == 2 end it_should_behave_like "a zset-only command" end
Version data entries
11 entries across 11 versions & 2 rubygems