aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_controller/test_case.rb6
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions/routing.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index d303aafdd9..49a6d1c145 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -516,7 +516,7 @@ module ActionController
end
end
- @request = build_request
+ @request = build_request({}, TestRequest.new_session)
@request.env["rack.request.cookie_hash"] = {}.with_indifferent_access
@response = build_response @response_klass
@response.request = @request
@@ -527,8 +527,8 @@ module ActionController
end
end
- def build_request
- TestRequest.new({}, TestRequest.new_session)
+ def build_request(env, session)
+ TestRequest.new(env, session)
end
def build_response(klass)
diff --git a/actionpack/lib/action_dispatch/testing/assertions/routing.rb b/actionpack/lib/action_dispatch/testing/assertions/routing.rb
index 4ea0cd68ac..48765fe83c 100644
--- a/actionpack/lib/action_dispatch/testing/assertions/routing.rb
+++ b/actionpack/lib/action_dispatch/testing/assertions/routing.rb
@@ -183,7 +183,7 @@ module ActionDispatch
end
# Assume given controller
- request = build_request
+ request = build_request({}, ActionController::TestRequest.new_session)
if path =~ %r{://}
fail_on(URI::InvalidURIError, msg) do