Thiago Arrais
2007-Jan-08 18:41 UTC
Testing RSS feeds on functional tests (yet another question)
Is there any commonly used way to test RSS feeds and/or XML output? I have done my research and found those two links http://greenprogrammer.blogspot.com/2006/08/testing-xml-ish-stuff-in-rails.html http://lists.rubyonrails.org/pipermail/rails/2006-August/062267.html My first attempts were to use assert_tag directly. I knew the response body wouldn''t be XHTML, but thought the parser would deal happily with well-formed XML. It turns out it doesn''t. It seems to not like the <link> tag that is mandatory in RSS 2.0. The message I get is something along the lines of ''ignoring attempt to close channel with link'', but the XML _is_ well formed. The guy on the message and blog post above proposes a solution to another problem (namely asserting against other XML data sources) and it doesn''t seem to apply to mine. I have no problem with asserting against the response body only, but I need to use a parser that recognizes RSS or at least XML. Before I proceed to write my assertions using some XML processing lib, I need to ask how are you guys testing your RSS feeds? Cheers, Thiago Arrais --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---