[rspec-devel] [ rspec-Patches-11888 ] rspec_on_rails spews out warnings when assert_select is used with an XML response

noreply at rubyforge.org noreply at rubyforge.org
Tue Jul 10 11:42:44 EDT 2007


Patches item #11888, was opened at 2007-06-27 13:13
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=11888&group_id=797

Category: rails plugin
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Ian Leitch (idl)
>Assigned to: Aslak Hellesøy (aslak_hellesoy)
Summary: rspec_on_rails spews out warnings when assert_select is used with an XML response

Initial Comment:
The warning:

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.

----------------------------------------------------------------------

>Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-07-10 11:42

Message:
Thanks! Applied in r2165

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=11888&group_id=797


More information about the rspec-devel mailing list