diff options
Diffstat (limited to 'spec/env/runtime.js')
-rw-r--r-- | spec/env/runtime.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/env/runtime.js b/spec/env/runtime.js new file mode 100644 index 0000000..fb4b342 --- /dev/null +++ b/spec/env/runtime.js @@ -0,0 +1,15 @@ +require('./common'); + +global.Handlebars = require('../../dist/handlebars.runtime'); + +var compiler = require('../../lib/handlebars'); + +global.CompilerContext = { + compile: function(template, options) { + var templateSpec = compiler.precompile(template, options); + return Handlebars.template(eval('(' + templateSpec + ')')); + }, + compileWithPartial: function(template, options) { + return compiler.compile(template, options); + } +}; |