Sha256: d4a223f68a408196a00d18d72791fe0c73a7d636100bb8b4d0d537d77d9124c6
Contents?: true
Size: 677 Bytes
Versions: 29
Compression:
Stored size: 677 Bytes
Contents
require 'spec_helper' describe "#mapped_hmget(key, *fields)" do before do @key = "mock-redis-test:mapped_hmget" @redises.hmset(@key, 'k1', 'v1', 'k2', 'v2') end it "returns values stored at key" do @redises.mapped_hmget(@key, 'k1', 'k2').should == {'k1' => 'v1', 'k2' => 'v2'} end it "returns nils for missing fields" do @redises.mapped_hmget(@key, 'k1', 'mock-redis-test:nonesuch'). should == {'k1' => 'v1', 'mock-redis-test:nonesuch' => nil} end it "raises an error if given no fields" do lambda do @redises.mapped_hmget(@key) end.should raise_error(RuntimeError) end it_should_behave_like "a hash-only command" end
Version data entries
29 entries across 29 versions & 1 rubygems