aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-03-21 18:29:15 +0000
committerPratik Naik <pratiknaik@gmail.com>2009-03-21 18:34:05 +0000
commit320933205e16164ff55245aef1e95fb06e609d06 (patch)
tree682db473d23e12a6a9b5c729e7bb67039f0e96be /activerecord/test
parent2bc4189faf1dc9ebc59054be0b54e15d098ab1f2 (diff)
downloadrails-320933205e16164ff55245aef1e95fb06e609d06.tar.gz
rails-320933205e16164ff55245aef1e95fb06e609d06.tar.bz2
rails-320933205e16164ff55245aef1e95fb06e609d06.zip
Deprecate Errors#on_base/add_to_base/invalid?/each_full
Diffstat (limited to 'activerecord/test')
-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