tests for #create and #create! init blocks

This commit is contained in:
Peter Williams 2011-05-31 16:31:37 -06:00
parent 9369ad96d3
commit 53bc7637e2
2 changed files with 14 additions and 2 deletions

View file

@ -21,8 +21,8 @@ module CouchRest
# Creates the document in the db. Raises an exception
# if the document is not created properly.
def create!
self.class.fail_validate!(self) unless self.create
def create!(options = {})
self.class.fail_validate!(self) unless self.create(options)
end
# Trigger the callbacks (before, after, around)