spec/toy/persistence_spec.rb in toystore-0.6 vs spec/toy/persistence_spec.rb in toystore-0.6.1
- old
+ new
@@ -11,9 +11,14 @@
it "sets if arguments and reads if not" do
User.store(:memory, {})
User.store.should == Adapter[:memory].new({})
end
+ it "defaults options to empty hash" do
+ Adapter[:memory].should_receive(:new).with({}, {})
+ User.store(:memory, {})
+ end
+
it "works with options" do
Adapter[:memory].should_receive(:new).with({}, :something => true)
User.store(:memory, {}, :something => true)
end
\ No newline at end of file