提交 f4d9ba02 编写于 作者: P prasath

Removed unwanted intializer and replaced with ruby default collect method

上级 82ba5c46
......@@ -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"])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册