spec/cubbyhole_spec.rb in cubbyhole-0.1.1 vs spec/cubbyhole_spec.rb in cubbyhole-0.2.0
- old
+ new
@@ -54,6 +54,14 @@
it "finds all objects" do
3.times { MyModel.create }
MyModel.all.size.should == 3
end
+
+ it "allows you to destroy objects" do
+ object = MyModel.create
+ id = object.id
+
+ object.destroy
+ MyModel.get(object.id).should be_nil
+ end
end