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

Remove xhr and xml_http_request due to rails 5 deprecation warning #32

Merged
merged 2 commits into from
Nov 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/rails/controller/testing/integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ module Rails
module Controller
module Testing
module Integration
%w(
get post patch put head delete xml_http_request
xhr get_via_redirect post_via_redirect
).each do |method|
http_verbs = %w(get post patch put head delete get_via_redirect post_via_redirect)
http_verbs.push('xhr', 'xml_http_request') if Rails::VERSION::STRING.to_f <= 5.0

http_verbs.each do |method|
define_method(method) do |*args|
reset_template_assertion
super(*args)
Expand Down