Skip to content

Commit 0be1869

Browse files
author
Peter H. Boling
committed
🔥 Remove redundant tests
1 parent db68346 commit 0be1869

1 file changed

Lines changed: 1 addition & 28 deletions

File tree

‎test/test_xpath_parser.rb‎

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ module REXMLTests
44
class TestXPathParser < Test::Unit::TestCase
55
def setup
66
@root_element = make_service_element(["urn:type1", "urn:type2"], ["http://uri"])
7-
@root = @root_element.root
87
@element = @root_element.children[0]
8+
@parser = REXML::XPathParser.new
99
end
1010

1111
def make_service_element(types, uris)
@@ -20,34 +20,7 @@ def make_service_element(types, uris)
2020
root_element
2121
end
2222

23-
def test_is_first_child
24-
assert_kind_of(REXML::Element, @element)
25-
end
26-
27-
def test_has_element_as_parent
28-
assert_kind_of(REXML::Element, @element.parent)
29-
end
30-
31-
def test_has_element_as_root
32-
assert_kind_of(REXML::Element, @root)
33-
end
34-
35-
def test_parent_is_root
36-
assert_equal(@root, @element.parent)
37-
end
38-
39-
def test_has_nil_siblings
40-
assert_nil(@root.previous_sibling)
41-
assert_nil(@element.next_sibling)
42-
end
43-
44-
def test_has_not_nil_siblings
45-
assert_kind_of(REXML::Element, @element.children[0].next_sibling)
46-
assert_kind_of(REXML::Element, @element.children[1].previous_sibling)
47-
end
48-
4923
def test_found
50-
@parser = REXML::XPathParser.new
5124
res = @parser.parse("/Service", @root_element)
5225
assert_equal([@element],
5326
res)

0 commit comments

Comments
 (0)