-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes In Rails 6 ActionView::Template Breaks EmptyTemplateHandler #2086
Comments
Any PR for this should target |
Hi @JonRowe - targeting |
@jamesjefferies Why not be Rails version specific? For example rspec-rails/lib/rspec-rails.rb Line 10 in 8c6c959
|
TBH I'm not sure we need to gate this, our method defines one argument, it needs two on this version of Rails, seems like simply adding a second optional argument would fix it, and gate the spec instead. (Also 👋 @jamesjefferies) |
@JonRowe ah yes, that sounds like the best way to sort this .. and yes! 👋 |
@JonRowe I toyed with that in a monkey-patch
, but given the method doesn't use |
It'd need to be |
Fixed in #2089 |
Need to bump to beta version of rspec for the fix for rspec/rspec-rails#2086.
This solves a problem with Rails 6: rspec/rspec-rails#2086
This solves a problem with Rails 6: rspec/rspec-rails#2086
This solves a problem with Rails 6: rspec/rspec-rails#2086
This solves a problem with Rails 6: rspec/rspec-rails#2086
This solves a problem with Rails 6: rspec/rspec-rails#2086
Update rspec-rails to 4.0.0.beta3 (required for rails 6 controller tests; see rspec/rspec-rails#2086) Configure action_dispatch media_type return to deal with deprecation warning
* Perform rails app:upgrade to prepare for upgrade to rails 6. Discard most changes from this task that either clobbered app-specific setup or were unecessary comments or formatting changes. Update Rails to 6.0.0, update all gems with outdated dependencies * Comment out breaking call to maintain_test_schema in rspec helper Update rspec-rails to 4.0.0.beta3 (required for rails 6 controller tests; see rspec/rspec-rails#2086) Configure action_dispatch media_type return to deal with deprecation warning * (organization) Set logo to nil instead of calling purge in failed validation (fixes Rails 6 breakage) * fix(organization) Use logo= setter instead of setting local var in validation
As discussed in rspec/rspec-rails#2086 , rspec-rails 3.x is incompatible with rails 6, making controller tests to fail. For now FeedBunch will use a beta relase of rspec-rails 4, and will switch to stable releases once rspec-rails 4 stable is released.
Changes to the Template handler calls in Rails 6.0 beta breaks EmptyTemplateResolver
Specifically this change which changes actionview/lib/action_view/template.rb, line 307, from this...
code = @handler.call(LegacyTemplate.new(self, source))
... to this ...
code = @handler.call(self, source)
... breaks rspec-rails, lib/rspec/rails/view_rendering.rb, line 105
def self.call(_template)
with the following error;
ActionView::Template::Error: wrong number of arguments (given 2, expected 1)
Ruby version: ruby 2.5.1p57
Rails version: 6.0.0.beta2
Rspec version: 3.8.2
The text was updated successfully, but these errors were encountered: