New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle ActionView::PathSet immutability and strict type casting in Rails 7.1 #2631
Conversation
Follows rails/rails@0371317. ActionView::PathSet no longer responds to unshift or push. We could copy the new implementation, but we've chosen to delegate to it instead. Co-authored-by: Iliana Hadzhiatanasova <me@iliana.dev>
Follows rails/rails@e65d41a. ActionView::PathSet now rejects resolvers unless they inherit from ActionView::Resolver, so ResolverDecorator must do so. By removing all inherited methods, we ensure that method_missing will still intercept all method calls. Co-authored-by: Iliana Hadzhiatanasova <me@iliana.dev>
Thanks a lot @eugeneius and @ilianah ! |
Can you add a spec for this @eugeneius / @ilianah ? The linked build wasn't failing before this? |
It was, it's just deceivingly green on GitHub:
|
Ah great, thats not obvious from the link |
@pirj Can you add a changelog entry as you merged this |
@JonRowe Already pushed 馃憤 |
Can you also cherry pick the merge and the changelog commit across to |
Done 馃憤 |
Released in 6.0.2 |
rspec-rails < 6.0.2 is incompatible with Rails 7.1 because of stricter view path typecasting in Rails 7.1. This bug is fixed in rspec-rails 6.0.2. Without this, controller specs in extensions will break. rspec/rspec-rails#2631
rspec-rails < 6.0.2 is incompatible with Rails 7.1 because of stricter view path typecasting in Rails 7.1. This bug is fixed in rspec-rails 6.0.2. Without this, controller specs in extensions will break. rspec/rspec-rails#2631 This also raises the minimum version to rspec-rails 5 as Solidus 3.x needs Rails > 5.2, and rspec-rails 5 is the version for that Rails version.
Since rails/rails#45957,
ActionView::PathSet
is immutable, and only accepts subclasses ofActionView::Resolver
. This necessitates changes to how RSpec Rails decorates resolvers to return blank templates whenrender_views?
is false.These changes fix the test suite when running against the Rails main branch:
https://github.com/rspec/rspec-rails/actions/runs/3340449858/jobs/5530555101
Co-authored by @ilianah 馃崘