This is a stupid one. When I moved my app using RSpec 3.9 from Ruby 2.0/Rails 4.2 to Ruby 2.2/Rails 4.2, some of my tests died with a very stupid error of the form:
I tried adding "config.action_controller.default_url_options = {protocol: 'http', host: 'test.host’}”
and "Rails.application.routes.default_url_options = {protocol: 'http', host: 'test.host’}”
with no change in behavior.
My test looks like: expect(response).to redirect_to(app_path.root_path)
where app_path has the following definition in spec_helper.rb:
Rails.application.routes.url_helpers
Note, by the way that I’m using #root_path and yet I’m getting a host in the URL; not sure why that is.