Permalink
Browse files

Rewind StringIO instances before be parsed again

  • Loading branch information...
1 parent e04d953 commit 20bd16330c006f1abb092587890bced9da53422a @pacoguzman pacoguzman committed Jun 15, 2013
@@ -195,6 +195,7 @@ def test_children_with_blank_text_and_attribute
private
def assert_equal_rexml(xml)
parsed_xml = XmlMini.parse(xml)
+ xml.rewind if xml.respond_to?(:rewind)
hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) }
assert_equal(hash, parsed_xml)
end
@@ -186,6 +186,7 @@ def test_children_with_blank_text
private
def assert_equal_rexml(xml)
parsed_xml = XmlMini.parse(xml)
+ xml.rewind if xml.respond_to?(:rewind)
hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) }
assert_equal(hash, parsed_xml)
end
@@ -208,6 +208,7 @@ def test_children_with_blank_text_and_attribute
private
def assert_equal_rexml(xml)
parsed_xml = XmlMini.parse(xml)
+ xml.rewind if xml.respond_to?(:rewind)
hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) }
assert_equal(hash, parsed_xml)
end
@@ -209,6 +209,7 @@ def test_children_with_blank_text_and_attribute
private
def assert_equal_rexml(xml)
parsed_xml = XmlMini.parse(xml)
+ xml.rewind if xml.respond_to?(:rewind)
hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) }
assert_equal(hash, parsed_xml)
end
@@ -30,6 +30,7 @@ def test_parse_from_io
private
def assert_equal_rexml(xml)
parsed_xml = XmlMini.parse(xml)
+ xml.rewind if xml.respond_to?(:rewind)
hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) }
assert_equal(hash, parsed_xml)
end

0 comments on commit 20bd163

Please sign in to comment.