From 320933205e16164ff55245aef1e95fb06e609d06 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sat, 21 Mar 2009 18:29:15 +0000 Subject: Deprecate Errors#on_base/add_to_base/invalid?/each_full --- activerecord/test/cases/validations_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/validations_test.rb b/activerecord/test/cases/validations_test.rb index 69691aad02..a220580a8d 100644 --- a/activerecord/test/cases/validations_test.rb +++ b/activerecord/test/cases/validations_test.rb @@ -27,7 +27,7 @@ class ValidationsTest < ActiveRecord::TestCase r = Reply.new r.title = "Wrong Create" assert !r.valid? - assert r.errors.invalid?("title"), "A reply with a bad title should mark that attribute as invalid" + assert r.errors[:title].any?, "A reply with a bad title should mark that attribute as invalid" assert_equal ["is Wrong Create"], r.errors[:title], "A reply with a bad content should contain an error" end @@ -40,7 +40,7 @@ class ValidationsTest < ActiveRecord::TestCase r.title = "Wrong Update" assert !r.save, "Second save should fail" - assert r.errors.invalid?("title"), "A reply with a bad title should mark that attribute as invalid" + assert r.errors[:title].any?, "A reply with a bad title should mark that attribute as invalid" assert_equal ["is Wrong Update"], r.errors[:title], "A reply with a bad content should contain an error" end -- cgit v1.2.3