Remove FULL_CONTEXT from spec_helper
This commit is contained in:
+1
-1
@@ -421,7 +421,7 @@ describe "Parser" do
|
||||
end
|
||||
|
||||
it "can pass through an already-compiled AST via compile/precompile" do
|
||||
@context = Handlebars::Spec::FULL_CONTEXT
|
||||
@context = Handlebars::Spec::CONTEXT
|
||||
|
||||
code = 'Handlebars.compile(new Handlebars.AST.ProgramNode([ new Handlebars.AST.ContentNode("Hello")]))();'
|
||||
@context.eval(code).should == "Hello"
|
||||
|
||||
+1
-18
@@ -87,7 +87,7 @@ module Handlebars
|
||||
end
|
||||
CompilerContext["compileWithPartial"] = proc do |this, *args|
|
||||
template, options = args[0], args[1] || nil
|
||||
FULL_CONTEXT["Handlebars"]["compile"].call(template, options);
|
||||
context["Handlebars"]["compile"].call(template, options);
|
||||
end
|
||||
end
|
||||
|
||||
@@ -116,23 +116,6 @@ module Handlebars
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
FULL_CONTEXT = V8::Context.new
|
||||
FULL_CONTEXT.instance_eval do |context|
|
||||
Handlebars::Spec.load_helpers(context);
|
||||
|
||||
Handlebars::Spec.js_load(context, 'dist/handlebars.js');
|
||||
|
||||
context["Handlebars"]["logger"]["level"] = ENV["DEBUG_JS"] ? context["Handlebars"]["logger"][ENV["DEBUG_JS"]] : 4
|
||||
|
||||
context["Handlebars"]["logger"]["log"] = proc do |this, level, str|
|
||||
logger_level = context["Handlebars"]["logger"]["level"].to_i
|
||||
|
||||
if logger_level <= level
|
||||
puts str
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user