File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 11require 'action_view'
2+ require 'action_controller'
23require 'gon/helpers'
34
45module Gon
Original file line number Diff line number Diff line change 33
44describe Gon , '#all_variables' do
55 before ( :each ) do
6- Gon . stub ( :request ) . and_return ( request )
6+ Gon . request_env = { }
77 end
88
99 it 'returns all variables in hash' do
2828 it 'output as js correct' do
2929 Gon . clear
3030 Gon . int = 1
31- ActionView ::Base . instance_methods . include? ( 'include_gon' ) . should == true
31+ ActionView ::Base . instance_methods . map ( & :to_s ) . include? ( 'include_gon' ) . should == true
3232 base = ActionView ::Base . new
33- base . include_gon . should == "<script>window.Gon = {};" +
34- "Gon .int=1;" +
33+ base . include_gon . should == "<script>window.gon = {};" +
34+ "gon .int=1;" +
3535 "</script>"
3636 end
3737
You can’t perform that action at this time.
0 commit comments