spec/commands/zrem_spec.rb in mock_redis-0.16.1 vs spec/commands/zrem_spec.rb in mock_redis-0.17.0
- old
+ new
@@ -31,7 +31,13 @@
it 'supports a variable number of arguments' do
@redises.zrem(@key, %w[one two])
@redises.zrange(@key, 0, -1).should be_empty
end
+ it 'raises an error if member is an empty array' do
+ lambda do
+ @redises.zrem(@key, [])
+ end.should raise_error(Redis::CommandError)
+ end
+
it_should_behave_like 'a zset-only command'
end