Skip to content

Commit

Permalink
Merge pull request #32 from Shuiei/remove_xhr_and_xml_http_request
Browse files Browse the repository at this point in the history
Remove xhr and xml_http_request due to rails 5 deprecation warning
  • Loading branch information
rafaelfranca committed Nov 29, 2018
2 parents 4e094da + 9f2dc3d commit ebaadf0
Showing 1 changed file with 3 additions and 4 deletions.
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

0 comments on commit ebaadf0

Please sign in to comment.