2012-08-14 32 views
0

我想測試一個主幹應用程序。
當我需要測試一個簡單的backbone.view時,我沒有問題。
如果我需要測試使用Backbone.Marionette(ItemView控件或CompositeView中)製成的骨幹查看和Handlebars template我得到以下信息:用茉莉花測試木偶視圖和把手模板

NoTemplateError: Could not find template: 
function(context, options) { 
    if (!compiled) { 
     compiled = compile(); 
    } 
    return compiled.call(this, context, options); 
    }; 

代碼約function(context, options)來自handlebars-1.0.0.beta.6.js
任何想法如何解決代碼?

在這裏,我正在執行測試:

describe("AppViewMarionette", function() { 
    beforeEach(function(){ 
     this.view = new AppViewMarionette(); 

    }); 

    describe("Rendering", function() { 

     it("returns the view object", function() { 
      expect(this.view.render()).toEqual(this.view); 
     }); 
    }); 

}); 
+0

您使用的是什麼版本的木偶嗎? – 2012-08-14 17:57:38

+0

Hi @DerickBailey。我正在使用'Backbone.Marionette v0.9.1'。 – 2012-08-14 18:58:15

回答