Sha256: 016e96b1c520f0282fad1e77e8c1ed4a58cb53c0e5043708605cb377c3b20a2a
Contents?: true
Size: 528 Bytes
Versions: 33
Compression:
Stored size: 528 Bytes
Contents
require 'spec_helper' describe '#getrange(key, start, stop)' do before do @key = 'mock-redis-test:getrange' @redises.set(@key, 'This is a string') end it 'returns a substring' do @redises.getrange(@key, 0, 3).should == 'This' end it 'works with negative indices' do @redises.getrange(@key, -3, -1).should == 'ing' end it 'limits the result to the actual length of the string' do @redises.getrange(@key, 10, 100).should == 'string' end it_should_behave_like 'a string-only command' end
Version data entries
33 entries across 33 versions & 1 rubygems