Session on multiple request requests in rspec request specifications

How do I ask rspec to use / maintain the session used for the previous request for the next request.

If I print a session after the first receipt, it is different from the session that I see in the processing of blah2_path actions.

get blah_path, {}, headers
get blah2_path, {}, headers # use same session as blah2_path
+4
source share
1 answer

Try with this:

before :all do
  @my_session = ActionController::TestSession.new
end
before do
  controller.stub session: @my_session
end
+1
source

All Articles