spec/lib/backends/redis_spec.rb in rector-0.0.1 vs spec/lib/backends/redis_spec.rb in rector-0.0.2
- old
+ new
@@ -21,11 +21,11 @@
hsh = {
"foo" => 1,
"bar" => 2
}
- redis.expects(:sadd).with("#{job_id}:__keys__", "foo", "bar")
+ redis.expects(:sadd).with("#{job_id}:__keys__", ["foo", "bar"])
subject.update_job_data_from_hash(hsh)
end
it "stores integers" do
hsh = { "foo" => 1 }
@@ -35,17 +35,17 @@
end
it "stores lists" do
hsh = { "foo" => ["a", "b", "c"] }
- redis.expects(:rpush).with("#{job_id}:foo", "a", "b", "c")
+ redis.expects(:rpush).with("#{job_id}:foo", ["a", "b", "c"])
subject.update_job_data_from_hash(hsh)
end
it "stores sets" do
hsh = { "foo" => Set.new(["a", "b", "c"]) }
- redis.expects(:sadd).with("#{job_id}:foo", "a", "b", "c")
+ redis.expects(:sadd).with("#{job_id}:foo", ["a", "b", "c"])
subject.update_job_data_from_hash(hsh)
end
end
describe "reading" do