Tell contextual validations specs which database to use

This commit is contained in:
Kim Burgestrand 2011-07-31 04:44:35 +02:00
parent 80e5ed2767
commit 465c0681e2

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