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:
commit
2fd9816851
1 changed files with 1 additions and 2 deletions
|
@ -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"])
|
||||
|
|
Loading…
Reference in a new issue