spec/hashes_spec.rb in fakeredis-0.4.0 vs spec/hashes_spec.rb in fakeredis-0.4.1
- old
+ new
@@ -93,20 +93,20 @@
@client.hmget("key1", "i1", "i2", "i3").should =~ ["val1", "val2", nil]
@client.hmget("key2", "i1", "i2").should == [nil, nil]
end
it "throws an argument error when you don't ask for any keys" do
- lambda { @client.hmget("key1") }.should raise_error(ArgumentError)
+ lambda { @client.hmget("key1") }.should raise_error(Redis::CommandError)
end
it "should reject an empty list of values" do
- lambda { @client.hmset("key") }.should raise_error(ArgumentError)
+ lambda { @client.hmset("key") }.should raise_error(Redis::CommandError)
@client.exists("key").should be_false
end
it 'rejects an insert with a key but no value' do
- lambda { @client.hmset("key", 'foo') }.should raise_error(ArgumentError)
- lambda { @client.hmset("key", 'foo', 3, 'bar') }.should raise_error(ArgumentError)
+ lambda { @client.hmset("key", 'foo') }.should raise_error(Redis::CommandError)
+ lambda { @client.hmset("key", 'foo', 3, 'bar') }.should raise_error(Redis::CommandError)
@client.exists("key").should be_false
end
it "should set multiple hash fields to multiple values" do
@client.hmset("key", "k1", "value1", "k2", "value2")