 
 QUnit.module "Batman.Model hasMany Associations"
   setup: ->
-    namespace = this
+    Batman.currentApp = null
+    namespace = {}
 
-    class @Store extends Batman.Model
+    namespace.Store = class @Store extends Batman.Model
       @encode 'id', 'name'
       @hasMany 'products', namespace: namespace
 

        name: "Store One"
        id: 1

    class @Product extends Batman.Model
      @encode 'id', 'name', 'store_id'
      @belongsTo 'store', namespace: namespace
      @hasMany 'productVariants', namespace: namespace

          product_id:3
        }]

    namespace.ProductVariant = class @ProductVariant extends Batman.Model
      @encode 'price'
      @belongsTo 'product', namespace: namespace

