summaryrefslogtreecommitdiffstats
path: root/spec/builtins.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/builtins.js')
-rw-r--r--spec/builtins.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/builtins.js b/spec/builtins.js
index 4379725..bf77d1a 100644
--- a/spec/builtins.js
+++ b/spec/builtins.js
@@ -47,6 +47,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"};
@@ -104,9 +110,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() {