Skip to content

Commit

Permalink
fixing tests under 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Dec 6, 2009
1 parent b7ec221 commit 9d86eec
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/xml/sax/test_push_parser.rb
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

require "helper"

module Nokogiri
Expand Down Expand Up @@ -117,7 +119,9 @@ def test_recover
@parser.finish
assert(@parser.document.errors.size >= 1)
assert_equal [["p", []], ["bar", []]], @parser.document.start_elements
assert_equal "FooBar", @parser.document.data.to_s.gsub(/\s/, '')
assert_equal "FooBar", @parser.document.data.map { |x|
x.gsub(/\s/, '')
}.join
end

def test_broken_encoding
Expand All @@ -126,7 +130,7 @@ def test_broken_encoding
@parser.<< "<?xml version='1.0' encoding='UTF-8'?><r>Gau\337</r>"
@parser.finish
assert(@parser.document.errors.size >= 1)
assert_equal "Gau\337", @parser.document.data.to_s
assert_equal "Gau\337", @parser.document.data.join
assert_equal [["r"]], @parser.document.end_elements
end
end
Expand Down

0 comments on commit 9d86eec

Please sign in to comment.