counter_cachier 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/counter_cachier/mounter.rb +1 -1
- data/lib/counter_cachier/version.rb +1 -1
- data/spec/lib/mounter_spec.rb +10 -0
- metadata +1 -1
data/spec/lib/mounter_spec.rb
CHANGED
@@ -43,5 +43,15 @@ describe CounterCachier::Mounter do
|
|
43
43
|
CounterCachier.redis.should_receive :set
|
44
44
|
dummy.recalc_foo.should == 10
|
45
45
|
end
|
46
|
+
|
47
|
+
it "should properly read the object" do
|
48
|
+
CounterCachier.redis.should_receive(:get).and_return(4)
|
49
|
+
dummy.foo.should == 4
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should properly read the object" do
|
53
|
+
CounterCachier.should_receive(:read).with(dummy, Dummy.cachiers[:foo].cachier)
|
54
|
+
dummy.foo
|
55
|
+
end
|
46
56
|
end
|
47
57
|
end
|