On Jan 19, 2008, at 08:01 AM, Phlip wrote: > Eric Hodel wrote: > >>> As your HTML gets sicker, you can write sicker XPaths to match it. >> YAGNI says assert_equal will work just fine for this case. > > This isn't the forum for this topic, but assert_equal will break > over irrelevant changes, such as the order of attributes, or even > blanks. White-space changes are completely irrelevant to testing HTML that is inside a <pre>. Order of attributes changes are completely irrelevant to HTML construction from a String. > Another option is assert_hpricot, except that won't break if your > HTML turns ill-formed! External dependencies are not an option. > (And the "simple things" rules apply under test-/first/. We don't > have that luxury here. For code I maintain, they apply all the time.