Sha256: e2c17716a5905ae98d0cb9395eddb54e2d09b12c97de09671cc86bf4e2f8fa2c
Contents?: true
Size: 638 Bytes
Versions: 13
Compression:
Stored size: 638 Bytes
Contents
require 'spec_helper' describe '#get(key)' do before do @key = 'mock-redis-test:73288' end it 'returns nil for a nonexistent value' do @redises.get('mock-redis-test:does-not-exist').should be_nil end it 'returns a stored string value' do @redises.set(@key, 'forsooth') @redises.get(@key).should == 'forsooth' end it 'treats integers as strings' do @redises.set(@key, 100) @redises.get(@key).should == '100' end it 'stringifies key' do key = :a_symbol @redises.set(key, 'hello') @redises.get(key.to_s).should == 'hello' end it_should_behave_like 'a string-only command' end
Version data entries
13 entries across 13 versions & 1 rubygems