Skip to content

Commit d23f607

Browse files
authored
Not pass empty kwargs to ActionPack
Empty kwargs occur in simple calls without any parameters or headers, e.g. `get '/some/path`. Code added in rails#58 passes empty kwargs in the form of an empty hash to ActionPack that considers it not to be compatible with the new kwargs-style syntax and emits useless a deprecation warning.
1 parent a2cc8c6 commit d23f607

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/rails/controller/testing/integration.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ module Integration
1313
http_verbs.each do |method|
1414
define_method(method) do |*args, **kwargs|
1515
reset_template_assertion
16-
super(*args, **kwargs)
16+
if kwargs == {}
17+
super(*args)
18+
else
19+
super(*args, **kwargs)
20+
end
1721
end
1822
end
1923
end

0 commit comments

Comments
 (0)