aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-07-08 15:17:50 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-07-08 15:17:50 -0700
commit3cae6bc5fc8765b5a06fd3d123528159d1f850b7 (patch)
tree6471b75ec9b65d3325f626bd8836eecd56700835
parent4b1a0adf5449bfee6e4d350b36a62d9bacdf8654 (diff)
downloadrails-3cae6bc5fc8765b5a06fd3d123528159d1f850b7.tar.gz
rails-3cae6bc5fc8765b5a06fd3d123528159d1f850b7.tar.bz2
rails-3cae6bc5fc8765b5a06fd3d123528159d1f850b7.zip
pass the starting env and session to build_request
-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