Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove FULL_CONTEXT from spec_helper

  • Loading branch information...
commit 73f2016a6a5e7ce11077e44ec3288e0dac2df7c9 1 parent 381c113
@kpdecker kpdecker authored
Showing with 2 additions and 19 deletions.
  1. +1 −1  spec/parser_spec.rb
  2. +1 −18 spec/spec_helper.rb
View
2  spec/parser_spec.rb
@@ -421,7 +421,7 @@ def path(*parts)
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"
View
19 spec/spec_helper.rb
@@ -87,7 +87,7 @@ def self.js_load(context, file)
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 @@ def self.js_load(context, file)
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
Please sign in to comment.
Something went wrong with that request. Please try again.