提交 97d20b14 编写于 作者: T Timm

Removed case statement in equal_children? used child.element? instead.

上级 905d2bc6
...@@ -40,8 +40,7 @@ def compare_doms(expected, actual) ...@@ -40,8 +40,7 @@ def compare_doms(expected, actual)
def equal_children?(child, other_child) def equal_children?(child, other_child)
return false unless child.type == other_child.type return false unless child.type == other_child.type
case child.type if child.element?
when Nokogiri::XML::Node::ELEMENT_NODE
child.name == other_child.name && child.name == other_child.name &&
equal_attribute_nodes?(child.attribute_nodes, other_child.attribute_nodes) equal_attribute_nodes?(child.attribute_nodes, other_child.attribute_nodes)
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册