Merge pull request #108 from Burgestrand/fix-specs

Tell contextual validations specs which database to use
This commit is contained in:
Marcos Tapajós 2011-08-20 21:55:08 -07:00
commit 44e09f6083

View file

@ -85,11 +85,13 @@ end
# Following two fixture classes have __intentionally__ diffent syntax for setting the validation context
class WithContextualValidationOnCreate < CouchRest::Model::Base
use_database TEST_SERVER.default_database
property(:name, String)
validates(:name, :presence => {:on => :create})
end
class WithContextualValidationOnUpdate < CouchRest::Model::Base
use_database TEST_SERVER.default_database
property(:name, String)
validates(:name, :presence => true, :on => :update)
end