spec/gon/global_spec.rb in gon-3.0.3 vs spec/gon/global_spec.rb in gon-3.0.4
- old
+ new
@@ -2,10 +2,11 @@
describe Gon::Global do
before(:each) do
Gon::Global.clear
+ Gon::Request.instance_variable_set(:@request_env, nil)
end
describe '#all_variables' do
it 'returns all variables in hash' do
@@ -50,9 +51,10 @@
end
it 'outputs correct js with an integer and integer in Gon' do
Gon::Request.
instance_variable_set(:@request_id, request.object_id)
+ Gon::Request.env = {}
Gon.int = 1
Gon.global.int = 1
@base.include_gon.should == "<script>window.gon = {};" +
"gon.int=1;" +
"gon.global={\"int\":1};" +