[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
Wed Jun 27 13:13:41 EDT 2007


Patches item #11888, was opened at 2007-06-27 17: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: Open
Resolution: None
Priority: 3
Submitted By: Ian Leitch (idl)
Assigned to: Nobody (None)
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.

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

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