From 7f2b65d9239ff82ec0ab3ce4635dad008bd7f696 Mon Sep 17 00:00:00 2001 From: Giovanni Bassi Date: Sun, 27 Oct 2013 19:09:46 -0200 Subject: [PATCH] fixing error on swag (handlebars helper) on a test --- public/javascripts/bootstrap.coffee | 2 +- public/javascripts/test/store/productView.coffee | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/public/javascripts/bootstrap.coffee b/public/javascripts/bootstrap.coffee index 8485247..8602591 100644 --- a/public/javascripts/bootstrap.coffee +++ b/public/javascripts/bootstrap.coffee @@ -54,7 +54,7 @@ requirejs.config exports: '$.fn.expander' 'swag': deps: ['handlebars'] - exports: 'Swag' + exports: 'window.Swag' 'jrating': deps: [ 'jquery' ] exports: '$.fn.jRating' diff --git a/public/javascripts/test/store/productView.coffee b/public/javascripts/test/store/productView.coffee index c4b828e..e4d24dc 100644 --- a/public/javascripts/test/store/productView.coffee +++ b/public/javascripts/test/store/productView.coffee @@ -6,7 +6,10 @@ define [ 'areas/store/models/cart' 'underscore' 'areas/store/models/product' -], ($, ProductView, Backbone, Cart, _, Product) -> + 'swag' + 'handlebars' +], ($, ProductView, Backbone, Cart, _, Product, Swag, Handlebars) -> + Swag.registerHelpers Handlebars product1 = generatorc.product.a() product2 = generatorc.product.b() product3 = generatorc.product.a()