Sha256: 9b005ca44457d484eaa8e05d61bb1c60f74ae89765164eb9804ecd2cfd71c96f
Contents?: true
Size: 793 Bytes
Versions: 33
Compression:
Stored size: 793 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.0 end it "updates the item's score" do @redises.zincrby(@key, 10, 'bert') @redises.zscore(@key, 'bert').should == 11.0 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.0 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
33 entries across 33 versions & 1 rubygems