spec/sets_spec.rb in fakeredis-0.7.0 vs spec/sets_spec.rb in fakeredis-0.8.0
- old
+ new
@@ -17,10 +17,11 @@
expect { @client.sadd("key", []) }.to raise_error(Redis::CommandError, "ERR wrong number of arguments for 'sadd' command")
expect { @client.sinter(*[]) }.to raise_error(Redis::CommandError, "ERR wrong number of arguments for 'sinter' command")
expect { @client.sinter([]) }.to raise_error(Redis::CommandError, "ERR wrong number of arguments for 'sinter' command")
expect { @client.sunion(*[]) }.to raise_error(Redis::CommandError, "ERR wrong number of arguments for 'sunion' command")
expect { @client.sunion([]) }.to raise_error(Redis::CommandError, "ERR wrong number of arguments for 'sunion' command")
+ expect { @client.srem("key", []) }.to raise_error(Redis::CommandError, "ERR wrong number of arguments for 'srem' command")
expect(@client.smembers("key")).to be_empty
end
it "should add multiple members to a set" do
@@ -240,10 +241,10 @@
context 'when called with the optional number parameter of 1' do
it 'is an array of one random element from the set' do
random_elements = @client.srandmember("key1", 1)
- expect([['a'], ['b'], ['c']].include?(@client.srandmember("key1", 1))).to be true
+ expect([['a'], ['b'], ['c']].include?(random_elements)).to be true
end
end
context 'when called with the optional number parameter of 2' do
it 'is an array of two unique, random elements from the set' do