aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/xml_mini/rexml_engine_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/xml_mini/rexml_engine_test.rb')
-rw-r--r--activesupport/test/xml_mini/rexml_engine_test.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/activesupport/test/xml_mini/rexml_engine_test.rb b/activesupport/test/xml_mini/rexml_engine_test.rb
new file mode 100644
index 0000000000..b711619ba7
--- /dev/null
+++ b/activesupport/test/xml_mini/rexml_engine_test.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+require_relative "xml_mini_engine_test"
+
+class REXMLEngineTest < XMLMiniEngineTest
+ def test_default_is_rexml
+ assert_equal ActiveSupport::XmlMini_REXML, ActiveSupport::XmlMini.backend
+ end
+
+ def test_parse_from_empty_string
+ assert_equal({}, ActiveSupport::XmlMini.parse(""))
+ end
+
+ def test_parse_from_frozen_string
+ xml_string = "<root></root>"
+ assert_equal({ "root" => {} }, ActiveSupport::XmlMini.parse(xml_string))
+ end
+
+ private
+ def engine
+ "REXML"
+ end
+
+ def expansion_attack_error
+ RuntimeError
+ end
+end