Changing some validations to be compatible with activemodel.

This commit is contained in:
Tapajós 2009-10-30 16:07:59 -02:00
parent d4010ad76e
commit 58d621d399
11 changed files with 54 additions and 30 deletions

View file

@ -730,7 +730,7 @@ describe "ExtendedDocument" do
it "should not fail if the nested casted model doesn't have validation" do
Cat.property :trainer, :cast_as => 'Person'
Cat.validates_present :name
Cat.validates_presence_of :name
cat = Cat.new(:name => 'Mr Bigglesworth')
cat.trainer = Person.new
cat.trainer.validatable?.should be_false