Description
What Ruby, Rails and RSpec versions are you using?
Ruby version: 2.6.5p114
Rails version: Rails 6.0.1.rc1
RSpec version: RSpec 3.9 (rspec-rails 4.0.0)
Observed behaviour
Starting with Rails 6.0.1.rc1 urls in system specs are being generated by Rails url helpers for host www.example.com
instead of http://127.0.0.1
as was the case in Rails 6.0.0 and before. Due to this change, all system specs fail with timeout errors.
Specifically this line and commit introduced this change in RSpec system specs behavior.
Expected behaviour
Urls should be generated with host set to http://127.0.0.1
.
Can you provide an example app?
https://github.com/nnc/rspec_system_specs_bug
Test app includes both a system test and a system spec, just to show that system tests continue working fine before and after the offending commit.
This issue is the same in all Rails versions after 6.0.1.rc1 so I didn't include those. But there is a commit in test app with Rails 6.0.0 (last Rails release before rails/rails@ea77dbf) where system spec is passing.