diff options
author | Renato Mascarenhas <mascarenhas.renato@gmail.com> | 2012-12-01 22:25:43 -0200 |
---|---|---|
committer | Renato Mascarenhas <mascarenhas.renato@gmail.com> | 2012-12-01 22:30:33 -0200 |
commit | 703b6387ee30c6bc339f567f44db77dcec92bd80 (patch) | |
tree | a7ef8df95c18e57171b3a31463719152089b23a8 /activemodel | |
parent | a7776924a67d32067b2c1ecb9ca773c96a33da63 (diff) | |
download | rails-703b6387ee30c6bc339f567f44db77dcec92bd80.tar.gz rails-703b6387ee30c6bc339f567f44db77dcec92bd80.tar.bz2 rails-703b6387ee30c6bc339f567f44db77dcec92bd80.zip |
Call `full_messages` instead of `to_a` in its spec.
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/test/cases/errors_test.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activemodel/test/cases/errors_test.rb b/activemodel/test/cases/errors_test.rb index 293ce07f4e..e4df494b2c 100644 --- a/activemodel/test/cases/errors_test.rb +++ b/activemodel/test/cases/errors_test.rb @@ -161,7 +161,7 @@ class ErrorsTest < ActiveModel::TestCase person = Person.new person.errors.add(:name, "can not be blank") person.errors.add(:name, "can not be nil") - assert_equal ["name can not be blank", "name can not be nil"], person.errors.to_a + assert_equal ["name can not be blank", "name can not be nil"], person.errors.full_messages end test 'full_message should return the given message if attribute equals :base' do @@ -240,4 +240,3 @@ class ErrorsTest < ActiveModel::TestCase person.errors.add_on_blank :name, :message => 'custom' end end - |