summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-04-07 16:50:57 -0500
committerkpdecker <kpdecker@gmail.com>2013-04-07 16:50:57 -0500
commit73f2016a6a5e7ce11077e44ec3288e0dac2df7c9 (patch)
tree8301ee85deaedfffa91250f92fedcde861d724d6
parent381c113d66bfe1de3ad88cbde9d247f1d5caff40 (diff)
downloadhandlebars.js-73f2016a6a5e7ce11077e44ec3288e0dac2df7c9.zip
handlebars.js-73f2016a6a5e7ce11077e44ec3288e0dac2df7c9.tar.gz
handlebars.js-73f2016a6a5e7ce11077e44ec3288e0dac2df7c9.tar.bz2
Remove FULL_CONTEXT from spec_helper
-rw-r--r--spec/parser_spec.rb2
-rw-r--r--spec/spec_helper.rb19
2 files changed, 2 insertions, 19 deletions
diff --git a/spec/parser_spec.rb b/spec/parser_spec.rb
index 9997027..293fe1f 100644
--- a/spec/parser_spec.rb
+++ b/spec/parser_spec.rb
@@ -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"
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index e79415a..eb2f26a 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -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