diff options
Diffstat (limited to 'spec/builtins.js')
-rw-r--r-- | spec/builtins.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/builtins.js b/spec/builtins.js index f7aa84d..7c3e012 100644 --- a/spec/builtins.js +++ b/spec/builtins.js @@ -49,6 +49,12 @@ describe('builtin helpers', function() { }); describe('#each', function() { + beforeEach(function() { + handlebarsEnv.registerHelper('detectDataInsideEach', function(options) { + return options.data && options.data.exclaim; + }); + }); + it("each", function() { var string = "{{#each goodbyes}}{{text}}! {{/each}}cruel {{world}}!"; var hash = {goodbyes: [{text: "goodbye"}, {text: "Goodbye"}, {text: "GOODBYE"}], world: "world"}; @@ -116,9 +122,6 @@ describe('builtin helpers', function() { equal(result, 'a!b!c!', 'should output data'); }); - Handlebars.registerHelper('detectDataInsideEach', function(options) { - return options.data && options.data.exclaim; - }); }); it("#log", function() { |