Skip to content

Commit

Permalink
add test coverage for NodeSet#each enum
Browse files Browse the repository at this point in the history
specifically we should test that it's the _right_ enumerator. :)
  • Loading branch information
flavorjones committed Jun 16, 2018
1 parent 75517e0 commit 00bafb7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/xml/test_node_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,10 @@ def test_include_on_empty_node_set

def test_each
employees = @xml.search("//employee")
assert_instance_of Enumerator, employees.each
enum = employees.each
assert_instance_of Enumerator, enum
assert_equal enum.next, employees[0]
assert_equal enum.next, employees[1]
end

def test_children
Expand Down

0 comments on commit 00bafb7

Please sign in to comment.