(轨道)Assert_Select的烦人警告 [英] (Rails) Assert_Select's Annoying Warnings
本文介绍了(轨道)Assert_Select的烦人警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人知道在rake测试期间如何使assert_select不输出所有这些讨厌的html警告吗?你知道,像这样的东西:
Does anyone know how to make assert_select not output all those nasty html warnings during a rake test? You know, like this stuff:
.ignoring attempt to close body with div
opened at byte 1036, line 5
closed at byte 5342, line 42
attributes at open: {"class"=>"inner02"}
text around open: "</script>\r\t</head>\r\t<body class=\"inner02"
text around close: "\t</div>\r\t\t\t</div>\r\t\t</div>\r\t</body>\r</ht"
谢谢
推荐答案
相反,您的代码正在生成无效的HTML.我建议通过验证程序运行它并修复所有验证错误.
It's rather that your code is generating invalid HTML. I suggest running it through a validator and fixing all the validation errors.
这篇关于(轨道)Assert_Select的烦人警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文