diff --git a/actionview/lib/action_view/testing/assertions/dom.rb b/actionview/lib/action_view/testing/assertions/dom.rb index d290591fcc02d123ea619b2bbfe99272ef9dfd21..e604c68ee0b2588c40ac80acc8a59018de2a4e44 100644 --- a/actionview/lib/action_view/testing/assertions/dom.rb +++ b/actionview/lib/action_view/testing/assertions/dom.rb @@ -40,8 +40,7 @@ def compare_doms(expected, actual) def equal_children?(child, other_child) return false unless child.type == other_child.type - case child.type - when Nokogiri::XML::Node::ELEMENT_NODE + if child.element? child.name == other_child.name && equal_attribute_nodes?(child.attribute_nodes, other_child.attribute_nodes) else