Permalink
Browse files

record.destroy returns record.

In fact; record.freeze returns record.
  • Loading branch information...
1 parent 972ad86 commit 806df19edfe496dba7e2d3d83a23c72c77bc76c1 @thhermansen thhermansen committed Oct 7, 2011
Showing with 5 additions and 0 deletions.
  1. +1 −0 lib/massive_record/orm/base.rb
  2. +4 −0 spec/orm/cases/persistence_spec.rb
@@ -222,6 +222,7 @@ def hash
def freeze
@attributes.freeze
+ self
end
def frozen?
@@ -382,6 +382,10 @@
person.should be_destroyed
end
+ it "returns destroyed record" do
+ person.destroy.should eq person
+ end
+
it "should be frozen after destroy" do
person.destroy
person.should be_frozen

0 comments on commit 806df19

Please sign in to comment.