Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
hset
for Array of Key / Value Pairs (#312)
Fixes #310 This resolves an issue where `Redis` and `MockRedis` were storing values slightly differently: ## With Redis: ```ruby require 'redis' redis = Redis.new hash = {:name=>"job", :namespace=>"default", :klass=>"Job"} redis.hset("key", hash.flatten) redis.hgetall("key") => {"name"=>"job", "namespace"=>"default", "klass"=>"Job"} ``` ## With MockRedis (with this change): ```ruby require 'mock_redis' mock_redis = MockRedis.new hash = {:name=>"job", :namespace=>"default", :klass=>"Job"} mock_redis.hset("key", hash.flatten) mock_redis.hgetall("key") => {"name"=>"job", "namespace"=>"default", "klass"=>"Job"} ```
- Loading branch information