Sha256: dd0dd39fc95b9ab1b4cef14f3d4d2817faef2401bd03f806344253f465572e72
Contents?: true
Size: 681 Bytes
Versions: 26
Compression:
Stored size: 681 Bytes
Contents
require 'spec_helper' describe "#hexists(key, field)" do before do @key = "mock-redis-test:hexists" @redises.hset(@key, 'field', 'value') end it "returns true if the hash has that field" do @redises.hexists(@key, 'field').should be_true end it "returns false if the hash lacks that field" do @redises.hexists(@key, 'nonesuch').should be_false end it "treats the field as a string" do @redises.hset(@key, 1, 'one') @redises.hexists(@key, 1).should be_true end it "returns nil when there is no such key" do @redises.hexists('mock-redis-test:nonesuch', 'key').should be_false end it_should_behave_like "a hash-only command" end
Version data entries
26 entries across 26 versions & 1 rubygems