Skip to content
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

EmptyTemplateHandler fix arguments #2089

Merged
merged 2 commits into from Feb 27, 2019
Merged

EmptyTemplateHandler fix arguments #2089

merged 2 commits into from Feb 27, 2019

Conversation

ahorek
Copy link

@ahorek ahorek commented Feb 27, 2019

fixes #2086

@@ -102,7 +102,7 @@ def find_templates(*args)

# @private
class EmptyTemplateHandler
def self.call(_template)
def self.call(*)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's preferable to have 1 required, 1 optional, just because it matches their API

@ahorek ahorek changed the base branch from 4-0-dev to master February 27, 2019 20:21
@ahorek ahorek changed the base branch from master to 4-0-dev February 27, 2019 20:22
@JonRowe
Copy link
Member

JonRowe commented Feb 27, 2019

If possible can we get a test for this?

@ahorek ahorek changed the title EmptyTemplateHandler with unlimited args EmptyTemplateHandler fix arguments Feb 27, 2019
@ahorek
Copy link
Author

ahorek commented Feb 27, 2019

there're already about 15 tests failing on rails master, so I don't think it's necessary

https://travis-ci.org/rspec/rspec-rails/jobs/499366086

1) GadgetsController GET #edit returns a success response
     Failure/Error: get :edit, params: {id: gadget.to_param}, session: valid_session
     
     ActionView::Template::Error:
       wrong number of arguments (given 2, expected 1)
     # /home/travis/build/rspec/bundle/ruby/2.6.0/bundler/gems/rails-controller-testing-21014e48be12/lib/rails/controller/testing/template_assertions.rb:61:in `process'
     # /home/travis/build/rspec/bundle/ruby/2.6.0/bundler/gems/rails-controller-testing-21014e48be12/lib/rails/controller/testing/integration.rb:13:in `block (2 levels) in <module:Integration>'
     # ./spec/controllers/gadgets_controller_spec.rb:70:in `block (3 levels) in <main>'
     # ------------------
     # --- Caused by: ---
     # ArgumentError:
     #   wrong number of arguments (given 2, expected 1)
     #   /home/travis/build/rspec/bundle/ruby/2.6.0/bundler/gems/rails-controller-testing-21014e48be12/lib/rails/controller/testing/template_assertions.rb:61:in `process'

@JonRowe
Copy link
Member

JonRowe commented Feb 27, 2019

Fair enough

@benoittgt
Copy link
Member

Didn't see it. Thanks!

@nijikon
Copy link

nijikon commented Oct 4, 2019

Can we backport this to 3.x and release a new version? /cc @JonRowe

@JonRowe
Copy link
Member

JonRowe commented Oct 4, 2019

Sorry no, work to release 4.0.0 is under way and it will be released soon, but its too much maintenance work to support Rails 6 in 3.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants