 
   source = '''
     <select multiple="multiple" size="2" data-bind="selected.names">
-      <option data-foreach-hero="heros" data-bind-value="hero"></option>
+      <option data-foreach-hero="heros" data-bind-value="hero" data-bind="hero | capitalize"></option>
     </select>
   '''
 


  helpers.render source, context, (node) ->
    equal node[0].value, 'foo'
    context.unset 'current'
    equal typeof context.get('current'), 'undefined'
    equal node[0].value, ''
    delay ->
      equal typeof context.get('current'), 'undefined'
      equal node[0].value, ''


asyncTest "should select an option with value='' when the data is ''", ->

    mario: Batman(selected: null)
    crono: Batman(selected: null)

  helpers.render '<select data-bind="something"><option value="mario" data-bind-selected="mario.selected">Mario</option><option value="crono" data-bind-selected="crono.selected">Crono</option></select>', context, (node) ->
    equal node[0].value, 'crono'
    equal context.get('crono.selected'), true
    equal context.get('mario.selected'), false
    deepEqual getContents(node), ['Mario', 'Crono']

    node[0].value = 'mario'
    helpers.triggerChange node[0]
    equal context.get('mario.selected'), true
    equal context.get('crono.selected'), false
    deepEqual getContents(node), ['Mario', 'Crono']

    QUnit.start()

asyncTest 'it binds the value of a multi-select box and updates the options when the bound value changes', ->
  context = new Batman.Object
    heros: new Batman.Set('mario', 'crono', 'link', 'kirby')
    selected: new Batman.Object(name: ['crono', 'link'])
  helpers.render '<select multiple="multiple" size="2" data-bind="selected.name"><option data-foreach-hero="heros" data-bind-value="hero" data-bind="hero | capitalize"></option></select>', context, (node) ->
    deepEqual getSelections(node), [no, yes, yes, no]
    deepEqual getContents(node), ['Mario', 'Crono', 'Link', 'Kirby']

    context.set 'selected.name', ['mario', 'kirby']

    deepEqual getSelections(node), [yes, no, no, yes]
    deepEqual getContents(node), ['Mario', 'Crono', 'Link', 'Kirby']
    QUnit.start()

asyncTest 'it binds the value of a multi-select box and updates the options when the options changes', ->
