1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #4709 from ask4prasath/refactor_validation_test

Removed unwanted intializer and replaced with ruby default collect method
This commit is contained in:
Aaron Patterson 2012-01-27 09:09:33 -08:00
commit 2fd9816851

View file

@ -58,8 +58,7 @@ class ValidationsTest < ActiveModel::TestCase
r = Reply.new
r.valid?
errors = []
r.errors.each {|attr, messages| errors << [attr.to_s, messages] }
errors = r.errors.collect {|attr, messages| [attr.to_s, messages]}
assert errors.include?(["title", "is Empty"])
assert errors.include?(["content", "is Empty"])