diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2013-06-16 00:32:33 +0200 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2013-06-16 00:32:33 +0200 |
commit | 20bd16330c006f1abb092587890bced9da53422a (patch) | |
tree | 6045fd3dc0e336817d32913903375188dc1edeb4 /activesupport/test/xml_mini | |
parent | e04d9538ea19e4032f25a3e5818a884b7dd602ea (diff) | |
download | rails-20bd16330c006f1abb092587890bced9da53422a.tar.gz rails-20bd16330c006f1abb092587890bced9da53422a.tar.bz2 rails-20bd16330c006f1abb092587890bced9da53422a.zip |
Rewind StringIO instances before be parsed again
Diffstat (limited to 'activesupport/test/xml_mini')
5 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/xml_mini/libxml_engine_test.rb b/activesupport/test/xml_mini/libxml_engine_test.rb index ab029e3910..a8df2e1f7b 100644 --- a/activesupport/test/xml_mini/libxml_engine_test.rb +++ b/activesupport/test/xml_mini/libxml_engine_test.rb @@ -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 diff --git a/activesupport/test/xml_mini/libxmlsax_engine_test.rb b/activesupport/test/xml_mini/libxmlsax_engine_test.rb index 010aea95d7..d6d90639e2 100644 --- a/activesupport/test/xml_mini/libxmlsax_engine_test.rb +++ b/activesupport/test/xml_mini/libxmlsax_engine_test.rb @@ -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 diff --git a/activesupport/test/xml_mini/nokogiri_engine_test.rb b/activesupport/test/xml_mini/nokogiri_engine_test.rb index eb1b0b84b4..2e962576b5 100644 --- a/activesupport/test/xml_mini/nokogiri_engine_test.rb +++ b/activesupport/test/xml_mini/nokogiri_engine_test.rb @@ -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 diff --git a/activesupport/test/xml_mini/nokogirisax_engine_test.rb b/activesupport/test/xml_mini/nokogirisax_engine_test.rb index 0719854e3a..4f078f31e0 100644 --- a/activesupport/test/xml_mini/nokogirisax_engine_test.rb +++ b/activesupport/test/xml_mini/nokogirisax_engine_test.rb @@ -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 diff --git a/activesupport/test/xml_mini/rexml_engine_test.rb b/activesupport/test/xml_mini/rexml_engine_test.rb index 0f1187db57..0c1f11803c 100644 --- a/activesupport/test/xml_mini/rexml_engine_test.rb +++ b/activesupport/test/xml_mini/rexml_engine_test.rb @@ -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 |