From c19f06b4eee4399bc261f4fe04aac76218731c55 Mon Sep 17 00:00:00 2001 From: wycats Date: Wed, 29 Dec 2010 19:20:03 -0800 Subject: [PATCH] Updated semantics --- spec/qunit_spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js index 44b5ea4b..39d4d64f 100644 --- a/spec/qunit_spec.js +++ b/spec/qunit_spec.js @@ -7,7 +7,7 @@ Handlebars.registerHelper('helperMissing', function(helper, context) { }); var shouldCompileTo = function(string, hash, expected, message) { - var template = Handlebars.VM.compile(string); + var template = Handlebars.compile(string); if(Object.prototype.toString.call(hash) === "[object Array]") { if(hash[1]) { for(var prop in Handlebars.helpers) { @@ -260,7 +260,7 @@ test("block helper", function() { var string = "{{#goodbyes}}{{text}}! {{/goodbyes}}cruel {{world}}!"; var template = Handlebars.compile(string); - result = template({goodbyes: function(context, fn) { return fn({text: "GOODBYE"}); }, world: "world"}); + result = template({goodbyes: function(fn) { return fn({text: "GOODBYE"}); }, world: "world"}); equal(result, "GOODBYE! cruel world!"); }); @@ -268,7 +268,7 @@ test("block helper staying in the same context", function() { var string = "{{#form}}

{{name}}

{{/form}}" var template = Handlebars.compile(string); - result = template({form: function(context, fn) { return "
" + fn(this) + "
" }, name: "Yehuda"}); + result = template({form: function(fn) { return "
" + fn(this) + "
" }, name: "Yehuda"}); equal(result, "

Yehuda

"); }); @@ -308,7 +308,7 @@ test("nested block helpers", function() { result = template({ form: function(context, fn) { return "
" + fn(context) + "
" }, yehuda: {name: "Yehuda", - link: function(context, fn) { return "" + fn(context) + ""; } + link: function(fn) { return "" + fn(this) + ""; } } }); equal(result, "

Yehuda

Hello
");