spec/gon/basic_spec.rb in gon-3.0.2 vs spec/gon/basic_spec.rb in gon-3.0.3

- old
+ new

@@ -77,9 +77,22 @@ @base.include_gon(need_tag: false).should == \ 'window.gon = {};' + 'gon.int=1;' end + + it 'outputs correct js without variables, without tag and gon init' do + @base.include_gon(need_tag: false, init: true).should == \ + 'window.gon = {};' + end + + it 'outputs correct js without variables, without tag and gon init' do + Gon.int = 1 + @base.include_gon(need_tag: false, init: true).should == \ + 'window.gon = {};' + + 'gon.int=1;' + end + end it 'returns exception if try to set public method as variable' do Gon.clear lambda { Gon.all_variables = 123 }.should raise_error