   objects1 = new Batman.Set('foo', 'bar', 'baz')
   objects2 = new Batman.Set('a', 'b', 'c')
 
-  helpers.render source, false, {objects1, objects2}, (node) ->
-    names = $('p', node).map(-> @innerHTML).toArray()
-    deepEqual names, ['foo', 'bar', 'baz', 'a', 'b', 'c']
+  helpers.render source, false, {objects1, objects2}, (node, view) ->
+    deepEqual getPs(view), ['foo', 'bar', 'baz', 'a', 'b', 'c']
     QUnit.start()
 
 asyncTest 'it should render consecutive loops bound to the same collection', 4, ->
   source = '<p data-foreach-object="objects" data-bind="object"></p><p data-foreach-object="objects" data-bind="object"></p>'
   objects = new Batman.Set('foo', 'bar', 'baz')
 
-  helpers.render source, false, {objects}, (node) ->
-    equal $('p', node).length, 6
+  helpers.render source, false, {objects}, (node, view) ->
+    deepEqual getPs(view), ['foo', 'bar', 'baz', 'foo', 'bar', 'baz']
     objects.remove 'foo'
     delay ->
-      equal $('p', node).length, 4
+      deepEqual getPs(view), ['bar', 'baz', 'bar', 'baz']
       objects.remove 'bar'
       delay ->
-        equal $('p', node).length, 2
+        deepEqual getPs(view), ['baz', 'baz']
         objects.remove 'baz'
         delay ->
           equal $('p', node).length, 0

      equal parseInt(childNode.innerHTML, 10), playerScores[childNode.id]
    QUnit.start()

getPs = (view) -> $('p', view.get('node')).map(-> @innerHTML).toArray()

asyncTest 'it should prevent parent renders even if it has to defer (note: this test can take a while)', ->
  oldDeferEvery = Batman.DOM.Iterator::deferEvery

  helpers.render source, {objects}, (node, view) ->
    objects.remove('foo')
    delay =>
      deepEqual getPs(view), ['bar']

asyncTest 'it should atomically reorder DOM nodes when the set is reordered', ->
  source = '<div><p data-foreach-object="objects.sortedBy[currentSort]" class="present" data-bind="object.name"></p></div>'
