Rails/Rspec – testing a redirect in the controller March 7, 2023 by Tarik To make the test more readable you can do this: (rspec ~> 3.0) expect(response).to redirect_to(action_path)