Permalink
Browse files

Removed unwanted intializer and replaced with ruby default collect me…

…thod
  • Loading branch information...
1 parent 82ba5c4 commit f4d9ba0296d1a66fe0eaa17ee8aa32e618e053d1 prasath committed Jan 26, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 activemodel/test/cases/validations_test.rb
@@ -58,8 +58,7 @@ def test_single_error_per_attr_iteration
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"])

0 comments on commit f4d9ba0

Please sign in to comment.