From 6b92a9895db3447b13deada25ec2ad148732a6df Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 29 Apr 2014 12:19:55 +0300 Subject: [PATCH 1/3] ; before annonymous function for the package --- lib/jst/aggregator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jst/aggregator.rb b/lib/jst/aggregator.rb index 60beb6e..95d1b3c 100644 --- a/lib/jst/aggregator.rb +++ b/lib/jst/aggregator.rb @@ -9,7 +9,7 @@ def save(output=JST.config.output) def aggregate <<-JST - (function() { + ;(function() { this.Templates = {}; #{process_all} }).call(this); From 76be84d9ef5ca44e60293998567f64dbfa8b47a3 Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 10 Sep 2014 19:16:11 +0300 Subject: [PATCH 2/3] Comment on failing tests --- spec/template_handlebars_spec.rb | 2 +- spec/template_prototypejs_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/template_handlebars_spec.rb b/spec/template_handlebars_spec.rb index af6cc20..8de42ed 100644 --- a/spec/template_handlebars_spec.rb +++ b/spec/template_handlebars_spec.rb @@ -11,5 +11,5 @@ %(this.Templates["hellohb"] = function(context){ return Handlebars.compile(#{template_content.inspect})(context); }) end - its(:to_jst){ should eq expected_result } + #its(:to_jst){ should eq expected_result } end diff --git a/spec/template_prototypejs_spec.rb b/spec/template_prototypejs_spec.rb index ae233c0..15b2729 100644 --- a/spec/template_prototypejs_spec.rb +++ b/spec/template_prototypejs_spec.rb @@ -11,5 +11,5 @@ %(this.Templates["hello"] = function(context){ return new Template(#{template_content.inspect}).evaluate(context); }) end - its(:to_jst){ should eq expected_result } + #its(:to_jst){ should eq expected_result } end From 665d8298424e849eb90695d62f3826509940da36 Mon Sep 17 00:00:00 2001 From: Leo Date: Thu, 18 Sep 2014 00:49:17 +0300 Subject: [PATCH 3/3] fix its rspec 3.0 --- jst.gemspec | 1 + spec/aggregator_spec.rb | 1 + spec/template_handlebars_spec.rb | 2 +- spec/template_prototypejs_spec.rb | 3 ++- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/jst.gemspec b/jst.gemspec index 14546dd..02be5f1 100644 --- a/jst.gemspec +++ b/jst.gemspec @@ -22,4 +22,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency "rake" spec.add_development_dependency "rspec" spec.add_development_dependency "therubyracer" + spec.add_development_dependency "rspec-its" end diff --git a/spec/aggregator_spec.rb b/spec/aggregator_spec.rb index 6f1a1ed..30b53a1 100644 --- a/spec/aggregator_spec.rb +++ b/spec/aggregator_spec.rb @@ -1,4 +1,5 @@ require 'spec_helper' +require 'rspec/its' describe JST::Aggregator do diff --git a/spec/template_handlebars_spec.rb b/spec/template_handlebars_spec.rb index 8de42ed..af6cc20 100644 --- a/spec/template_handlebars_spec.rb +++ b/spec/template_handlebars_spec.rb @@ -11,5 +11,5 @@ %(this.Templates["hellohb"] = function(context){ return Handlebars.compile(#{template_content.inspect})(context); }) end - #its(:to_jst){ should eq expected_result } + its(:to_jst){ should eq expected_result } end diff --git a/spec/template_prototypejs_spec.rb b/spec/template_prototypejs_spec.rb index 15b2729..f8a35ed 100644 --- a/spec/template_prototypejs_spec.rb +++ b/spec/template_prototypejs_spec.rb @@ -1,4 +1,5 @@ require 'spec_helper' +require 'rspec/its' describe JST::Template::PrototypeJS do subject do @@ -11,5 +12,5 @@ %(this.Templates["hello"] = function(context){ return new Template(#{template_content.inspect}).evaluate(context); }) end - #its(:to_jst){ should eq expected_result } + its(:to_jst){ should eq expected_result } end