( gon ) :
RSpec.describe ThingiesController do
let(:gon) { RequestStore.store[:gon].gon }
describe 'GET #new' do
it 'gonifies as expected' do
get :new, {}, valid_session
expect(gon['key']).to eq :value
end
end
end
controller action gon - (, gon - ApplicationController), :
RSpec.describe ApplicationController do
let(:gon) { RequestStore.store[:gon].gon }
controller do
def index
render text: :whatever
end
end
describe '#gon_related_method' do
it 'gonifies as expected' do
get :index
expect(gon['key']).to eq :value
end
end
end
controller request/integration , gon , .
, , ( shared_examples, controller). issue, ( , ).