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
+6 -3
View File
@@ -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() {