aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/filters_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-07-08 14:14:59 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-07-08 14:15:53 -0700
commit460079a7717281bb5a20eab0239215f8e0e71de6 (patch)
tree5a7362dcb7474c39cbedb3d74e04aa3e9e2f5e50 /actionpack/test/controller/filters_test.rb
parent0f62e3ecf4124ce9f38ea57479bd7252a76ebb15 (diff)
downloadrails-460079a7717281bb5a20eab0239215f8e0e71de6.tar.gz
rails-460079a7717281bb5a20eab0239215f8e0e71de6.tar.bz2
rails-460079a7717281bb5a20eab0239215f8e0e71de6.zip
let the superclass build the request and response
We should leverage the request / response objects that the superclass has already allocated for us.
Diffstat (limited to 'actionpack/test/controller/filters_test.rb')
-rw-r--r--actionpack/test/controller/filters_test.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/actionpack/test/controller/filters_test.rb b/actionpack/test/controller/filters_test.rb
index 9b0487841f..8a6a51c263 100644
--- a/actionpack/test/controller/filters_test.rb
+++ b/actionpack/test/controller/filters_test.rb
@@ -757,9 +757,8 @@ class FilterTest < ActionController::TestCase
def test_dynamic_dispatch
%w(foo bar baz).each do |action|
- request = ActionController::TestRequest.new
- request.query_parameters[:choose] = action
- response = DynamicDispatchController.action(action).call(request.env).last
+ @request.query_parameters[:choose] = action
+ response = DynamicDispatchController.action(action).call(@request.env).last
assert_equal action, response.body
end
end
@@ -839,8 +838,6 @@ class FilterTest < ActionController::TestCase
private
def test_process(controller, action = "show")
@controller = controller.is_a?(Class) ? controller.new : controller
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
process(action)
end