Fix test runners under node

This commit is contained in:
kpdecker
2013-10-09 03:22:05 -07:00
parent 4d7124f6bf
commit 3b0a3ca1b2
5 changed files with 34 additions and 24 deletions
+4 -7
View File
@@ -3,14 +3,11 @@ require('./common');
global.Handlebars = require('../../lib');
global.CompilerContext = {
compile: function(template, options, env) {
env = env || handlebarsEnv;
var templateSpec = Handlebars.precompile(template, options);
return Handlebars.template(eval('(' + templateSpec + ')'), env);
compile: function(template, options) {
var templateSpec = handlebarsEnv.precompile(template, options);
return handlebarsEnv.template(eval('(' + templateSpec + ')'));
},
compileWithPartial: function(template, options) {
options = options || {};
options.env = handlebarsEnv;
return Handlebars.compile(template, options);
return handlebarsEnv.compile(template, options);
}
};