Skip to content

Commit 0991ab7

Browse files
jhawthornaubinlrx
andcommitted
Move {get,post}_via_redirect into conditional
Co-authored-by: Aubin Lorieux <[email protected]>
1 parent e7b4e8a commit 0991ab7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/rails/controller/testing/integration.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ module Rails
44
module Controller
55
module Testing
66
module Integration
7-
http_verbs = %w(get post patch put head delete get_via_redirect post_via_redirect)
8-
http_verbs.push('xhr', 'xml_http_request') if ActionPack.version < Gem::Version.new('5.1')
7+
http_verbs = %w(get post patch put head delete)
8+
9+
if ActionPack.version < Gem::Version.new('5.1')
10+
http_verbs.push('xhr', 'xml_http_request', 'get_via_redirect', 'post_via_redirect')
11+
end
912

1013
http_verbs.each do |method|
1114
define_method(method) do |*args, **kwargs|

0 commit comments

Comments
 (0)