Sha256: e52ce2a4e5ebc7042f8813cb48908c77e9fbfdc01bf8baa3b1873fa3bc2d35c6

Contents?: true

Size: 415 Bytes

Versions: 39

Compression:

Stored size: 415 Bytes

Contents

require 'spec_helper'

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

  it "returns 0 for an empty set" do
    @redises.scard(@key).should == 0
  end

  it "returns the number of elements in the set" do
    @redises.sadd(@key, 'one')
    @redises.sadd(@key, 'two')
    @redises.sadd(@key, 'three')
    @redises.scard(@key).should == 3
  end

  it_should_behave_like "a set-only command"
end

Version data entries

39 entries across 39 versions & 2 rubygems

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