 
 asyncTest 'data-bind-style should correctly work for style with absolute URL', 1, ->
   source = '<input type="text" data-bind-style="string"></input>'
-  context = Batman
+  context =
     string: 'background-image: url("http://batmanjs.org/images/logo.png");'
 
   helpers.render source, context, (node) ->

helpers = if typeof require is 'undefined' then window.viewHelpers else require './view_helper'

QUnit.module 'Batman.View style bindings',
asyncTest 'data-bind-style should bind to a string', 4, ->
  source = '<input type="text" data-bind-style="string"></input>'
  context = Batman
    string: 'backgroundColor:blue; color:green;'

  helpers.render source, context, (node) ->
    node = node[0]
    equal node.style['backgroundColor'], 'blue'
    equal node.style['color'], 'green'

    context.set 'string', 'color: green'
    equal node.style['backgroundColor'], ''
    equal node.style['color'], 'green'



asyncTest 'data-bind-style should bind dash-separated CSS keys to camelized ones', 4, ->
  source = '<input type="text" data-bind-style="string"></input>'
  context =
    string: 'background-color:blue; color:green;'

  helpers.render source, context, (node, view) ->
    node = node[0]
    equal node.style['backgroundColor'], 'blue'
    equal node.style['color'], 'green'

    view.set('string', 'color: green')
    equal node.style['backgroundColor'], ''
    equal node.style['color'], 'green'

