aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/xml_mini/nokogiri_engine_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/xml_mini/nokogiri_engine_test.rb')
-rw-r--r--activesupport/test/xml_mini/nokogiri_engine_test.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/activesupport/test/xml_mini/nokogiri_engine_test.rb b/activesupport/test/xml_mini/nokogiri_engine_test.rb
index 71f57e43d2..2e962576b5 100644
--- a/activesupport/test/xml_mini/nokogiri_engine_test.rb
+++ b/activesupport/test/xml_mini/nokogiri_engine_test.rb
@@ -155,7 +155,7 @@ class NokogiriEngineTest < ActiveSupport::TestCase
morning
</root>
eoxml
- XmlMini.parse(io)
+ assert_equal_rexml(io)
end
def test_children_with_simple_cdata
@@ -206,10 +206,12 @@ class NokogiriEngineTest < ActiveSupport::TestCase
end
private
- def assert_equal_rexml(xml)
- hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) }
- assert_equal(hash, XmlMini.parse(xml))
- end
+ 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
end
end