You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In rails 7, if there is no session in the request, it now defaults to an object that responds to enabled?
However, because rack.session is set to {} in webmock (WebMock::RackResponse#session), when webmock us used in a way that mounts this rails app (using to_rack), this causes a failure in the following line in the rails app
def session
fetch_header(RACK_SESSION) do |k|
set_header RACK_SESSION, default_session
end
end
and fetch_header will return the session if already defined in env['rack.session'] therefore 'default_session' is not being called. The return value is therefore an empty hash which does not respond to enabled?
I am not sure if this is really a webmock issue or if rails are being a bit naughty setting rack.session to anything but a hash
The text was updated successfully, but these errors were encountered:
In rails 7, if there is no session in the request, it now defaults to an object that responds to enabled?
However, because rack.session is set to {} in webmock (WebMock::RackResponse#session), when webmock us used in a way that mounts this rails app (using to_rack), this causes a failure in the following line in the rails app
ActionDispatch::Flash::RequestMethods#commit_flash
where 'session' is defined as
and fetch_header will return the session if already defined in env['rack.session'] therefore 'default_session' is not being called. The return value is therefore an empty hash which does not respond to enabled?
I am not sure if this is really a webmock issue or if rails are being a bit naughty setting rack.session to anything but a hash
The text was updated successfully, but these errors were encountered: