Sha256: 469744de65601933a25d84f37cd07a9924bd93cc9be01bad2de14ca5d979f1f4

Contents?: true

Size: 412 Bytes

Versions: 39

Compression:

Stored size: 412 Bytes

Contents

require 'spec_helper'

describe "#zcard(key)" do
  before do
    @key = 'mock-redis-test:zcard'
  end

  it "returns the number of elements in the zset" do
    @redises.zadd(@key, 1, 'Washington')
    @redises.zadd(@key, 2, 'Adams')
    @redises.zcard(@key).should == 2
  end

  it "returns 0 for nonexistent sets" do
    @redises.zcard(@key).should == 0
  end

  it_should_behave_like "a zset-only command"
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
mock_redis-0.14.1 spec/commands/zcard_spec.rb
mock_redis-0.14.0 spec/commands/zcard_spec.rb
mock_redis-0.13.2 spec/commands/zcard_spec.rb
mock_redis-0.13.1 spec/commands/zcard_spec.rb
mock_redis-0.13.0 spec/commands/zcard_spec.rb
mock_redis-0.12.1 spec/commands/zcard_spec.rb
mock_redis-0.12.0 spec/commands/zcard_spec.rb
mock_redis-0.11.0 spec/commands/zcard_spec.rb
mock_redis-0.10.0 spec/commands/zcard_spec.rb
mock_redis-0.9.0 spec/commands/zcard_spec.rb
mock_redis-0.8.2 spec/commands/zcard_spec.rb
mock_redis-0.8.1 spec/commands/zcard_spec.rb
mock_redis-0.8.0 spec/commands/zcard_spec.rb
mock_redis-0.7.0 spec/commands/zcard_spec.rb
mock_redis-0.6.6 spec/commands/zcard_spec.rb
mock_redis-0.6.5 spec/commands/zcard_spec.rb
mock_redis-0.6.4 spec/commands/zcard_spec.rb
mock_redis-0.6.3 spec/commands/zcard_spec.rb
mock_redis-0.6.2 spec/commands/zcard_spec.rb
mock_redis-0.6.1 spec/commands/zcard_spec.rb