Sha256: 4998f3361e49f672f1ec34ef279f9302b251f317251a0a61cda54f88165a4a17

Contents?: true

Size: 407 Bytes

Versions: 12

Compression:

Stored size: 407 Bytes

Contents

require 'spec_helper'

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

  it "returns [] for an empty set" do
    @redises.smembers(@key).should == []
  end

  it "returns the set's members" do
    @redises.sadd(@key, 1)
    @redises.sadd(@key, 2)
    @redises.sadd(@key, 3)
    @redises.smembers(@key).should == %w[1 2 3]
  end

  it_should_behave_like "a set-only command"
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
mock_redis-0.4.1 spec/commands/smembers_spec.rb
mock_redis-0.4.0 spec/commands/smembers_spec.rb
mock_redis-0.3.0 spec/commands/smembers_spec.rb
ryansch-mock_redis-0.3.0 spec/commands/smembers_spec.rb
ryansch-mock_redis-0.2.0.2 spec/commands/smembers_spec.rb
ryansch-mock_redis-0.2.0.1 spec/commands/smembers_spec.rb
mock_redis-0.2.0 spec/commands/smembers_spec.rb
mock_redis-0.1.2 spec/commands/smembers_spec.rb
mock_redis-0.1.1 spec/commands/smembers_spec.rb
mock_redis-0.1.0 spec/commands/smembers_spec.rb
mock_redis-0.0.2 spec/commands/smembers_spec.rb
mock_redis-0.0.1 spec/commands/smembers_spec.rb