diff options
author | Kouhei Sutou <kou@clear-code.com> | 2019-02-10 05:37:28 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-04 11:54:57 +0900 |
commit | 33e4a59b4a051b853bc412cf8badfc26a7cb391a (patch) | |
tree | 2e0c9767ba4a867e5ea1c82246d3c11d9c8d3566 /test | |
parent | ee8985ef0e35183d606af3a7360cd4713069e9b2 (diff) | |
download | ruby-33e4a59b4a051b853bc412cf8badfc26a7cb391a.tar.gz |
[ruby/rexml] test: compare with real element
https://github.com/ruby/rexml/commit/9f2908de2e
Diffstat (limited to 'test')
-rw-r--r-- | test/rexml/test_functions.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/rexml/test_functions.rb b/test/rexml/test_functions.rb index c1716ebe1c..a00b25b2c1 100644 --- a/test/rexml/test_functions.rb +++ b/test/rexml/test_functions.rb @@ -237,8 +237,11 @@ module REXMLTests </root> XML - m = REXML::XPath.match(doc, "//foo[@bar=$n]", nil, { "n" => nil }) - assert_equal( 1, m.size ) + assert_equal([doc.root.elements[2]], + REXML::XPath.match(doc, + "//foo[@bar=$n]", + nil, + {"n" => nil})) end def test_unregistered_method |