Move more testing mutations into the environment

This commit is contained in:
Yehuda Katz
2013-07-26 17:18:56 +00:00
parent 5f664dd78b
commit d33408fcbd
5 changed files with 24 additions and 27 deletions
+1 -3
View File
@@ -19,12 +19,10 @@ describe('data', function() {
equals("hello", result, "@foo retrieves template data");
});
var objectCreate = Handlebars.createFrame;
it("deep @foo triggers automatic top-level data", function() {
var template = CompilerContext.compile('{{#let world="world"}}{{#if foo}}{{#if foo}}Hello {{@world}}{{/if}}{{/if}}{{/let}}');
var helpers = objectCreate(Handlebars.helpers);
var helpers = Handlebars.createFrame(handlebarsEnv.helpers);
helpers.let = function(options) {
var frame = Handlebars.createFrame(options.data);