aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/validations_test.rb4
1 files changed, 2 insertions, 2 deletions
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