Skip to content

System specs broken with Rails 6.0.1+ #2327

Closed
@nnc

Description

@nnc

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.

failures_r_spec_example_groups_website_works_939

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions