ruby 1行で rescue
最初の行、そうかー rescue でこういう if 文が書けるのかー。と思った。
if (ActionDispatch::Integration::Session.instance_method(:process_with_kwargs) rescue false) let(:send_request) do send http_method, path, params: request_body, headers: env end else let(:send_request) do send http_method, path, request_body, env end end