Re: [rspec-users] Comparing two XML documents

2011-01-31 Thread Matt Wynne
On 31 Jan 2011, at 08:26, Pat Maddox wrote: > I load my XML docs into a hash using Hash#from_xml and then compare the > hashes. Bullseye! Thanks Pat. > On Jan 26, 2011, at 7:26 AM, Matt Wynne wrote: > >> I have a problem. I have a test that needs to assert that one XML document >> looks exac

Re: [rspec-users] Comparing two XML documents

2011-01-31 Thread Pat Maddox
I load my XML docs into a hash using Hash#from_xml and then compare the hashes. On Jan 26, 2011, at 7:26 AM, Matt Wynne wrote: > I have a problem. I have a test that needs to assert that one XML document > looks exactly like another XML document. > > I couldn't find a way to compare them as

Re: [rspec-users] Comparing two XML documents

2011-01-26 Thread Kam Dahlin
Aaron Patterson (author of Nokogiri) addressed this issue directly here: http://rubyforge.org/pipermail/nokogiri-talk/2009-April/000258.html I don't think document comparison was ever implemented in Nokogiri though. Cheers, kam On Jan 26, 2011, at 7:26 AM, Matt Wynne wrote: > I have a problem.

[rspec-users] Comparing two XML documents

2011-01-26 Thread Matt Wynne
I have a problem. I have a test that needs to assert that one XML document looks exactly like another XML document. I couldn't find a way to compare them as Nokogiri::XML::Documents, so I converted them both to strings with #to_xml and compared the strings. Trouble is, sometimes the attributes