spec/gon/gon_spec.rb in gon-2.2.2 vs spec/gon/gon_spec.rb in gon-2.3.0

- old
+ new

@@ -65,10 +65,11 @@ it 'returns exception if try to set public method as variable' do Gon.clear lambda { Gon.all_variables = 123 }.should raise_error lambda { Gon.rabl = 123 }.should raise_error + lambda { Gon.request = 123 }.should raise_error end describe '.rabl' do require 'rabl' @@ -134,11 +135,10 @@ end end end - if RUBY_VERSION > '1.9' require 'jbuilder' require 'gon/jbuilder' describe '.jbuilder' do context 'render jbuilder templates' do @@ -162,18 +162,11 @@ Gon.objects.length.should == 2 end end - it 'should throw error if you use gon.jbuilder with ruby < 1.9+' do - RUBY_VERSION = '1.8.7' - - expect { Gon.jbuilder 'some_path'}.to raise_error(NoMethodError, /1.9/) - end - it 'should raise error if you use gon.jbuilder without requiring jbuilder gem' do - RUBY_VERSION = '1.9.2' Gon.send(:remove_const, :Jbuilder) expect { Gon.jbuilder 'some_path' }.to raise_error(NoMethodError, /Gemfile/) load 'jbuilder.rb' load 'gon/jbuilder.rb' @@ -212,10 +205,9 @@ end end end - end def request @request ||= double 'request', :env => {} end