Sha256: d17d02b9bda4cb20a06f34215effac081832673ad537238033c04d2de929420e
Contents?: true
Size: 518 Bytes
Versions: 16
Compression:
Stored size: 518 Bytes
Contents
require 'spec_helper' describe '#setex(key, seconds, value)' do before { @key = 'mock-redis-test:setex' } it "responds with 'OK'" do @redises.setex(@key, 10, 'value').should == 'OK' end it 'sets the value' do @redises.setex(@key, 10_000, 'value') @redises.get(@key).should == 'value' end it 'sets the expiration time' do @redises.setex(@key, 10_000, 'value') # no guarantee these are the same @redises.real.ttl(@key).should > 0 @redises.mock.ttl(@key).should > 0 end end
Version data entries
16 entries across 16 versions & 1 rubygems