Skip to content

Commit

Permalink
Merge pull request #58 from jhawthorn/ruby-2-7
Browse files Browse the repository at this point in the history
Fix ruby 2.7 warnings
  • Loading branch information
eileencodes authored May 5, 2020
2 parents 6f07f82 + 0991ab7 commit 2308945
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions lib/rails/controller/testing/integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ module Rails
module Controller
module Testing
module Integration
http_verbs = %w(get post patch put head delete get_via_redirect post_via_redirect)
http_verbs.push('xhr', 'xml_http_request') if ActionPack.version < Gem::Version.new('5.1')
http_verbs = %w(get post patch put head delete)

if ActionPack.version < Gem::Version.new('5.1')
http_verbs.push('xhr', 'xml_http_request', 'get_via_redirect', 'post_via_redirect')
end

http_verbs.each do |method|
define_method(method) do |*args|
define_method(method) do |*args, **kwargs|
reset_template_assertion
super(*args)
super(*args, **kwargs)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rails/controller/testing/template_assertions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def teardown_subscriptions
end
end

def process(*args)
def process(*, **)
reset_template_assertion
super
end
Expand Down

0 comments on commit 2308945

Please sign in to comment.