diff options
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/testing/assertions/dom.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionview/lib/action_view/testing/assertions/dom.rb b/actionview/lib/action_view/testing/assertions/dom.rb index 751c88c2e0..85a01f9b87 100644 --- a/actionview/lib/action_view/testing/assertions/dom.rb +++ b/actionview/lib/action_view/testing/assertions/dom.rb @@ -26,6 +26,8 @@ module ActionView # +compare_doms+ takes two doms loops over all their children and compares each child via +equal_children?+ def compare_doms(expected, actual) + return false unless expected.children.size == actual.children.size + expected.children.each_with_index do |child, i| return false unless equal_children?(child, actual.children[i]) end |