aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test/base_errors_test.rb
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 /activeresource/test/base_errors_test.rb
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 'activeresource/test/base_errors_test.rb')
-rw-r--r--activeresource/test/base_errors_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activeresource/test/base_errors_test.rb b/activeresource/test/base_errors_test.rb
index 8c177c8006..28813821df 100644
--- a/activeresource/test/base_errors_test.rb
+++ b/activeresource/test/base_errors_test.rb
@@ -20,7 +20,7 @@ class BaseErrorsTest < Test::Unit::TestCase
end
def test_should_parse_errors_to_individual_attributes
- assert @person.errors.invalid?(:name)
+ assert @person.errors[:name].any?
assert_equal ["can't be blank"], @person.errors[:age]
assert_equal ["can't be blank", "must start with a letter"], @person.errors[:name]
assert_equal ["Person quota full for today."], @person.errors[:base]
@@ -34,7 +34,7 @@ class BaseErrorsTest < Test::Unit::TestCase
def test_should_iterate_over_full_errors
errors = []
- @person.errors.each_full { |message| errors << message }
+ @person.errors.to_a.each { |message| errors << message }
assert errors.include?("Name can't be blank")
end