summaryrefslogtreecommitdiffstats
path: root/spec/builtins.js
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2013-07-26 17:18:56 +0000
committerYehuda Katz <wycats@gmail.com>2013-07-26 17:18:56 +0000
commitd33408fcbdc5b23615ebc51b0b25a3d69818de4c (patch)
treea9cc4f0fcaa88df811ea9c11a7bda13fe8cc46c9 /spec/builtins.js
parent5f664dd78b2c558a8a560b3fd0074109d52daf62 (diff)
downloadhandlebars.js-d33408fcbdc5b23615ebc51b0b25a3d69818de4c.zip
handlebars.js-d33408fcbdc5b23615ebc51b0b25a3d69818de4c.tar.gz
handlebars.js-d33408fcbdc5b23615ebc51b0b25a3d69818de4c.tar.bz2
Move more testing mutations into the environment
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() {