Use rspec-rails main when testing against Rails main - #36
Merged
Conversation
The suite fails to load under Rails main with a FrozenError, because rspec-rails mutates internals that Rails main now freezes. The fixes (e.g. rspec/rspec-rails#2915) are merged upstream but not yet released, so point the test dependency at rspec-rails main for the Rails main entry of the matrix. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CI's Rails main job fails while loading the feature specs with
FrozenError: can't modify frozen Hash(build (3.4, main) on the latest run): Rails main started freezing internals that the released rspec-rails still mutates.The fixes (e.g. rspec/rspec-rails#2915) are merged on rspec-rails main but not yet released, so the Gemfile now points the test dependency at rspec-rails main — only when
RAILS_VERSION=main, following the existing switch for the rails constraint. Released Rails versions keep the released rspec-rails, so the rest of the matrix is unaffected.Verification
RAILS_VERSION=main bundle lockresolves, picking up rspec-rails 8.1.0.pre from main against rails mainelsebranch is identical to the previous declaration)build (3.4, main)job on this PR for the actual suite run🤖 Generated with Claude Code