diff options
Diffstat (limited to 'activesupport/test/xml_mini/nokogiri_engine_test.rb')
-rw-r--r-- | activesupport/test/xml_mini/nokogiri_engine_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/test/xml_mini/nokogiri_engine_test.rb b/activesupport/test/xml_mini/nokogiri_engine_test.rb index 937517786e..2e962576b5 100644 --- a/activesupport/test/xml_mini/nokogiri_engine_test.rb +++ b/activesupport/test/xml_mini/nokogiri_engine_test.rb @@ -208,7 +208,8 @@ class NokogiriEngineTest < ActiveSupport::TestCase private def assert_equal_rexml(xml) parsed_xml = XmlMini.parse(xml) - hash = XmlMini.with_backend('REXML') { parsed_xml } + xml.rewind if xml.respond_to?(:rewind) + hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) } assert_equal(hash, parsed_xml) end end |