[rspec-users] rspec_on_rails: assert_select wrapper doesn't play nice with XML

David Chelimsky dchelimsky at gmail.com
Wed Jun 27 07:23:57 EDT 2007


On 6/27/07, Ian Leitch <port001 at gmail.com> wrote:
> Hey,
>
> I'm using rspec and rspec_on_rails to test some RSS feed views, the problem
> is that the specs spew out messy warnings when they run:
>
> ignoring attempt to close channel with link
>   opened at byte 61, line 3
>   closed at byte 141, line 5
>   attributes at open: {}
>   text around open: "ss version=\"2.0\">\n  <channel>\n    <title"
>   text around close: "brands/2154/feed.rss</link>\n
> <descrip"
>
> The XML in the view is actually well formed, the problem is that the
> HTML::Document class used is not instantiated in XML mode when an XML
> response body is present.
> See http://weblog.jamisbuck.org/2007/1/4/assert_xml_select
> for more info.
>
> I've had a go at patching this and 'it works for me', but I've not spent
> much time getting to know the internals of either rspec or rspec_on_rails,
> so it may well be the wrong solution.

Please post patches to the tracker, not the mailing lists.
http://rubyforge.org/tracker/?group_id=797

Thanks,
David

>
> Cheers
> Ian
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
>


More information about the rspec-users mailing list