Sha256: fc31a935a1b56c689794601bd81e83ce16e23e5ad7cf674876f9559bcb3fb7c7

Contents?: true

Size: 354 Bytes

Versions: 33

Compression:

Stored size: 354 Bytes

Contents

require 'spec_helper'

describe '#llen(key)' do
  before { @key = 'mock-redis-test:78407' }

  it 'returns 0 for a nonexistent key' do
    @redises.llen(@key).should == 0
  end

  it 'returns the length of the list' do
    5.times { @redises.lpush(@key, 'X') }
    @redises.llen(@key).should == 5
  end

  it_should_behave_like 'a list-only command'
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
mock_redis-0.36.0 spec/commands/llen_spec.rb
mock_redis-0.35.0 spec/commands/llen_spec.rb
mock_redis-0.34.0 spec/commands/llen_spec.rb
mock_redis-0.33.0 spec/commands/llen_spec.rb
mock_redis-0.32.0 spec/commands/llen_spec.rb
mock_redis-0.31.0 spec/commands/llen_spec.rb
mock_redis-0.30.0 spec/commands/llen_spec.rb
mock_redis-0.29.0 spec/commands/llen_spec.rb
mock_redis-0.28.0 spec/commands/llen_spec.rb
mock_redis-0.27.3 spec/commands/llen_spec.rb
mock_redis-0.27.2 spec/commands/llen_spec.rb
mock_redis-0.27.1 spec/commands/llen_spec.rb
mock_redis-0.27.0 spec/commands/llen_spec.rb
mock_redis-0.26.0 spec/commands/llen_spec.rb
mock_redis-0.25.0 spec/commands/llen_spec.rb
mock_redis-0.24.0 spec/commands/llen_spec.rb
mock_redis-0.23.0 spec/commands/llen_spec.rb
mock_redis-0.22.0 spec/commands/llen_spec.rb
mock_redis-0.21.0 spec/commands/llen_spec.rb
mock_redis-0.20.0 spec/commands/llen_spec.rb