diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-01-07 15:52:19 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-01-07 15:52:19 -0800 |
commit | 48963a55c7b4cbd06a66a4f9717801a7417acba9 (patch) | |
tree | fc105515a90752f1a1a724e53dd0ebd05ec36d75 | |
parent | 347db97eddfc4c303a005b71fce9faf12e74e63a (diff) | |
download | rails-48963a55c7b4cbd06a66a4f9717801a7417acba9.tar.gz rails-48963a55c7b4cbd06a66a4f9717801a7417acba9.tar.bz2 rails-48963a55c7b4cbd06a66a4f9717801a7417acba9.zip |
Set assigns for integration tests also
-rw-r--r-- | actionpack/lib/action_controller/integration.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/integration.rb b/actionpack/lib/action_controller/integration.rb index d9899112c3..ded72a71fb 100644 --- a/actionpack/lib/action_controller/integration.rb +++ b/actionpack/lib/action_controller/integration.rb @@ -367,8 +367,10 @@ module ActionController env[key] = value end - unless ActionController::Base.respond_to?(:clear_last_instantiation!) - ActionController::Base.module_eval { include ControllerCapture } + [ControllerCapture, ActionController::ProcessWithTest].each do |mod| + unless ActionController::Base < mod + ActionController::Base.class_eval { include mod } + end end ActionController::Base.clear_last_instantiation! @@ -396,6 +398,7 @@ module ActionController if @controller = ActionController::Base.last_instantiation @request = @controller.request @response = @controller.response + @controller.send(:set_test_assigns) else # Decorate responses from Rack Middleware and Rails Metal # as an Response for the purposes of integration testing |