diff options
Diffstat (limited to 'test/rexml/test_element.rb')
-rw-r--r-- | test/rexml/test_element.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/rexml/test_element.rb b/test/rexml/test_element.rb new file mode 100644 index 0000000000..82830b44e6 --- /dev/null +++ b/test/rexml/test_element.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: false + +require "test/unit/testcase" +require "rexml/document" + +module REXMLTests + class ElementTester < Test::Unit::TestCase + def test_array_reference_string + doc = REXML::Document.new("<language name='Ruby'/>") + assert_equal("Ruby", doc.root["name"]) + end + + def test_array_reference_symbol + doc = REXML::Document.new("<language name='Ruby'/>") + assert_equal("Ruby", doc.root[:name]) + end + end +end |