diff --git a/test/helper.rb b/test/helper.rb index bde85157..78189633 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -38,6 +38,12 @@ def commit_details :email => "tom@github.com" } end +def normal(text) + text.gsub!(' ', '') + text.gsub!("\n", '') + text +end + # test/spec/mini 3 # http://gist.github.com/25455 # chris@ozmm.org diff --git a/test/test_markup.rb b/test/test_markup.rb index ffe6364f..2ad76088 100644 --- a/test/test_markup.rb +++ b/test/test_markup.rb @@ -173,7 +173,7 @@ context "Markup" do @wiki.write_page("Potato", :mediawiki, "a [[Potato|Potato Heaad]] ", commit_details) page = @wiki.page("Potato") output = page.formatted_data - assert_equal "
\na Potato Heaad
", output + assert_equal normal("\na Potato Heaad
"), normal(output) end ######################################################################### @@ -513,7 +513,7 @@ context "Markup" do page = @wiki.page("Bilbo Baggins") rendered = Gollum::Markup.new(page).render if regexes.empty? - assert_equal output, rendered + assert_equal normal(output), normal(rendered) else regexes.each { |r| assert_match r, output } end @@ -528,6 +528,6 @@ context "Markup" do @wiki.clear_cache page = @wiki.page("Bilbo Baggins") rendered = Gollum::Markup.new(page).render - assert_equal output, rendered + assert_equal normal(output), normal(rendered) end end