tests for #create and #create! init blocks
This commit is contained in:
parent
9369ad96d3
commit
53bc7637e2
2 changed files with 14 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue