This is my proposed fix for the problem with assert_select raising warnings on xml documents. It simply checks to see if the response.content_type ends in xml, thereby catching the three common XML content types (application/xml, text/xml, and application/xhtml+xml).
This doesn't account for the common practice of sending XHTML as text/html for the benefit of Internet Explorer which doesn't understand proper mime types. However in practice parsing XHTML as HTML should not usually be a problem, whereas testing XML as HTML is very often a problem. I think using the ContentType is the right thing to do here, but I would also not discount the patch at http://dev.rubyonrails.org/ticket/1937 for making things more robust.
This would also negate the need for documentation at http://dev.rubyonrails.org/ticket/7042