spec/commands/blpop_spec.rb in mock_redis-0.13.0 vs spec/commands/blpop_spec.rb in mock_redis-0.13.1
- old
+ new
@@ -44,9 +44,13 @@
context "[mock only]" do
it "ignores positive timeouts and returns nil" do
@redises.mock.blpop('mock-redis-test:not-here', :timeout => 1).should be_nil
end
+ it "ignores positive legacy timeouts and returns nil" do
+ @redises.mock.blpop('mock-redis-test:not-here', 1).should be_nil
+ end
+
it "raises WouldBlock on zero timeout (no blocking in the mock)" do
lambda do
@redises.mock.blpop('mock-redis-test:not-here', :timeout => 0)
end.should raise_error(MockRedis::WouldBlock)
end