mbklein / equivalent-xml

Easy equivalency tests for Nokogiri and Oga XML
MIT License
94 stars 29 forks source link

Allow to compare XML-Fragments in Strings #22

Open marcoemrich opened 10 years ago

marcoemrich commented 10 years ago

Hi,

I found an issue when comparing Strings with NodeLists like "<h1>Headline</h1><h1>Headline</h1>" and "<h1>Headline</h1><h2>Headline2</h2>". Everything after the first tag got ignored.

The new spec (in this patch) demonstrates the issue. This patch is a simple fix by utilizing Nokogiris Fragment-Parsing.