 {TestStorageAdapter, AsyncTestStorageAdapter} = if typeof require isnt 'undefined' then require './model_helper' else window
+helpers = if typeof require is 'undefined' then window.viewHelpers else require '../view/view_helper'
 
 QUnit.module "Batman.Model One-To-One Associations"
   setup: ->


    @productAdapter = new AsyncTestStorageAdapter @Product
    @productAdapter.storage =
      'products1': {name: "One", id: 1, store_id: 1}
      'products2': {name: "Two", id: 2, store_id: 1}
    @Product.persist @productAdapter

    @Store.hasMany 'products', @Product

    equal variant6.get('product'), product

    QUnit.start()

asyncTest "hasMany associations render", ->
  @Store.find 1, (err, store) ->
    source = '<div><span data-foreach-product="store.products" data-bind="product.name"></span></div>'
    context = Batman(store: store)
    helpers.render source, context, (node) ->
      equal node.children().first().html(), 'Product One'
      equal node.children().last().html(), 'Product Two'
      QUnit.start()

