summaryrefslogtreecommitdiff
path: root/test/rexml/xpath/test_attribute.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-01-11 21:37:00 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2020-01-12 12:28:29 +0900
commitc3ccf23d5807f2ff20127bf5e42df0977bf672fb (patch)
treed3953c32b61645c7af65d30e626af944f143cf58 /test/rexml/xpath/test_attribute.rb
parent012f297311817ecb19f78c55854b033bb4b0397c (diff)
Make rexml library to the bundle gems
[Feature #16485][ruby-core:96683]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2832
Diffstat (limited to 'test/rexml/xpath/test_attribute.rb')
-rw-r--r--test/rexml/xpath/test_attribute.rb38
1 files changed, 0 insertions, 38 deletions
diff --git a/test/rexml/xpath/test_attribute.rb b/test/rexml/xpath/test_attribute.rb
deleted file mode 100644
index 713d77b22f..0000000000
--- a/test/rexml/xpath/test_attribute.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-# frozen_string_literal: false
-require 'test/unit'
-require 'rexml/document'
-
-module REXMLTests
- class TestXPathAttribute < Test::Unit::TestCase
- def setup
- @xml = <<-XML
-<?xml version="1.0" encoding="UTF-8"?>
-<root xmlns="http://example.com/">
- <child name="one">child1</child>
- <child name="two">child2</child>
- <child name="three">child3</child>
-</root>
- XML
- @document = REXML::Document.new(@xml)
- end
-
- def test_elements
- root = @document.elements["root"]
- second_child = root.elements["child[@name='two']"]
- assert_equal("child2", second_child.text)
- end
-
- def test_xpath_each
- children = REXML::XPath.each(@document, "/root/child[@name='two']")
- assert_equal(["child2"], children.collect(&:text))
- end
-
- def test_no_namespace
- children = REXML::XPath.match(@document,
- "/root/child[@nothing:name='two']",
- "" => "http://example.com/",
- "nothing" => "")
- assert_equal(["child2"], children.collect(&:text))
- end
- end
-end