FIX: Amazon spec

This commit is contained in:
Robin Ward
2013-10-04 12:49:39 -04:00
parent 2a97dbbb1f
commit c8487f6bc7
4 changed files with 13271 additions and 739 deletions

View File

@ -1,9 +1,9 @@
require 'nokogiri/xml/parse_options'
RSpec::Matchers.define :match_html do |expected|
match do |actual|
a = make_canonical_html(expected).to_html.gsub("\r\n", "\n")
b = make_canonical_html(actual).to_html.gsub("\r\n", "\n")
a == b
a = make_canonical_html(expected).to_html.gsub(/\s+/, " ").strip
b = make_canonical_html(actual).to_html.gsub(/\s+/, " ").strip
a.eql? b
end
failure_message_for_should do |actual|