ruby-on-rails – (Rails)Assert_Select的烦人的警告

有没有人知道如何使assert_select在耙测试期间不输出所有讨厌的html警告?你知道,像这样的东西:

.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。我建议通过验证器运行它并修复所有验证错误。
http://stackoverflow.com/questions/1671221/rails-assert-selects-annoying-warnings

本站文章除注明转载外,均为本站原创或编译
转载请明显位置注明出处:ruby-on-rails – (Rails)Assert_Select的烦人的警告