Permalink
Browse files

Call `full_messages` instead of `to_a` in its spec.

  • Loading branch information...
1 parent a777692 commit 703b6387ee30c6bc339f567f44db77dcec92bd80 @rmascarenhas rmascarenhas committed Dec 2, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 activemodel/test/cases/errors_test.rb
@@ -161,7 +161,7 @@ def test_has_key?
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 @@ def test_has_key?
person.errors.add_on_blank :name, :message => 'custom'
end
end
-

0 comments on commit 703b638

Please sign in to comment.