mirror of https://github.com/rails/rails
Rewind StringIO instances before be parsed again
This commit is contained in:
parent
e04d9538ea
commit
20bd16330c
|
@ -195,6 +195,7 @@ class LibxmlEngineTest < ActiveSupport::TestCase
|
|||
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 @@ class LibXMLSAXEngineTest < ActiveSupport::TestCase
|
|||
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 @@ class NokogiriEngineTest < ActiveSupport::TestCase
|
|||
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 @@ class NokogiriSAXEngineTest < ActiveSupport::TestCase
|
|||
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 @@ class REXMLEngineTest < ActiveSupport::TestCase
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue