       equal node[0].innerHTML, 'Product One'
       QUnit.start()
 
-QUnit.module "Batman.Model One-To-Many Associations"
+QUnit.module "hasMany Associations"
   setup: ->
     class @App extends Batman.App
-
-    class @App.Store extends Batman.Model
-      @encode 'id', 'name'
-      @hasMany 'products'
-
     # Batman.currentApp exists under node and causes the adapters to explode
     Batman.currentApp = undefined
 
+    class @App.Store extends Batman.Model
+      @encode 'id', 'name'
+      @hasMany 'products'
     @storeAdapter = new AsyncTestStorageAdapter @App.Store
     @storeAdapter.storage =
       'stores1': {name: "Store One", id: 1}

{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: ->
    class @App extends Batman.App
    class @App.Store extends Batman.Model
      @encode 'id', 'name'
      @hasOne 'product'

    # Batman.currentApp exists under node and causes the adapters to explode
    Batman.currentApp = undefined

    @storeAdapter = new AsyncTestStorageAdapter @App.Store
    @storeAdapter.storage =
      'stores1': {name: "Store One", id: 1}

      equal product._batman.attributes['store'], undefined
      QUnit.start()

asyncTest "hasOne models can save while related records are loading", 1, ->
  @App.Store.find 1, (err, store) ->
    product = store.get 'product'
    product._batman.state = 'loading'
    store.save (err, savedStore) ->
      ok !err
      QUnit.start()

asyncTest "hasOne associations render", 1, ->
