# File lib/rails/dom/testing/assertions/dom_assertions.rb, line 38
            def equal_children?(child, other_child)
              return false unless child.type == other_child.type

              if child.element?
                child.name == other_child.name &&
                    equal_attribute_nodes?(child.attribute_nodes, other_child.attribute_nodes) &&
                    compare_doms(child, other_child)
              else
                child.to_s == other_child.to_s
              end
            end