Sha256: a2b66d7053881be973ca865da03cb57685175eaf00aa547817a29e4ec789f7fa
Contents?: true
Size: 795 Bytes
Versions: 1
Compression:
Stored size: 795 Bytes
Contents
require 'spec_helper' describe "#zincrby(key, increment, member)" do before do @key = 'mock-redis-test:zincrby' @redises.zadd(@key, 1, 'bert') end it "returns the new score as a string" do @redises.zincrby(@key, 10, 'bert').should == "11" end it "updates the item's score" do @redises.zincrby(@key, 10, 'bert') @redises.zscore(@key, 'bert').should == "11" end it "handles integer members correctly" do member = 11 @redises.zadd(@key, 1, member) @redises.zincrby(@key, 1, member) @redises.zscore(@key, member).should == "2" end it "adds missing members with score increment" do @redises.zincrby(@key, 5.5, 'bigbird').should == "5.5" end it_should_behave_like "arg 1 is a score" it_should_behave_like "a zset-only command" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mock_redis-0.4.1 | spec/commands/zincrby_spec.rb |