Fix warning on arg forwarding in integration tests

Kwargs need to be forwarded for this method_missing to avoid warnings in Ruby 2.7.
This commit is contained in:
Kevin Deisz 2019-12-31 14:28:38 -05:00
parent 4628518382
commit e4c035a8fb
No known key found for this signature in database
GPG Key ID: D78C2D8FB232C59C
2 changed files with 4 additions and 2 deletions

View File

@ -432,6 +432,7 @@ module ActionDispatch
super
end
end
ruby2_keywords(:method_missing) if respond_to?(:ruby2_keywords, true)
end
end

View File

@ -170,9 +170,10 @@ end
class IntegrationTestUsesCorrectClass < ActionDispatch::IntegrationTest
def test_integration_methods_called
reset!
headers = { "Origin" => "*" }
%w( get post head patch put delete ).each do |verb|
assert_nothing_raised { __send__(verb, "/") }
%w( get post head patch put delete options ).each do |verb|
assert_nothing_raised { __send__(verb, "/", headers: headers) }
end
end
end