     <input type="radio" data-bind="ad.published" name="published" value="true"/>
   '''
 
-  context = Batman
-    ad: Batman()
-
-  helpers.render source, context, (node) ->
+  helpers.render source, {ad: Batman()}, (node, view) ->
     hidden = node[0]
     published = node[1]
 
     ok !published.checked
     ok hidden.checked
 
-    strictEqual context.get('ad.published'), false
-    context.set 'ad.published', true
+    strictEqual view.get('ad.published'), false
+    view.set 'ad.published', true
     ok published.checked
     ok !hidden.checked
 
     hidden.checked = true
     helpers.triggerChange hidden
-    equal context.get('ad.published'), false
-
-    QUnit.start()
+    equal view.get('ad.published'), false
+
+    QUnit.start()

    QUnit.start()

asyncTest 'it should bind the input value and update the input when it changes', 2, ->
  context = Batman
    one: "qux"

  helpers.render '<input data-bind="one" type="text" />', context, (node) ->
    equal $(node[0]).val(), 'qux'
    context.set('one', "bar")
    equal $(node[0]).val(), 'bar'
    QUnit.start()

asyncTest 'it should bind the input value but not update the window object if the input changes', 2, ->
  context = Batman({})

  helpers.render '<input data-bind="nonexistantKey" type="text" />', context, (node) ->
    equal node[0].value, ''
    node[0].value = 'foo'
    helpers.triggerChange(node[0])


    source = '<form data-formfor-foo="proxied"><input type="file" data-bind="foo.fileAttributes"></input></form>'

    helpers.render source, false, {proxied: context}, (node, view) ->
      helpers.triggerChange(node.childNodes[0].childNodes[0])
      strictEqual view.fileAttributes, undefined
      QUnit.start()

asyncTest 'should bind radio buttons to a value', ->
  source = '<input id="fixed" type="radio" data-bind="ad.sale_type" name="sale_type" value="fixed"/>
    <input id="free" type="radio" data-bind="ad.sale_type" name="sale_type" value="free"/>
    <input id="trade" type="radio" data-bind="ad.sale_type" name="sale_type" value="trade"/>'
  context = ad: Batman(sale_type: 'free')

  helpers.render source, context, (node, view) ->
    fixed = node[0]
    free = node[1]
    trade = node[2]

    ok (!fixed.checked and free.checked and !trade.checked)

    view.set('ad.sale_type', 'trade')
    ok (!fixed.checked and !free.checked and trade.checked)
    QUnit.start()

