Search code examples
ruby-on-railsfunctional-testing

(Rails) Assert_Select's Annoying Warnings


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"

Thanks


Solution

  • It's rather that your code is generating invalid HTML. I suggest running it through a validator and fixing all the validation errors.