Permalink
Browse files

Set assigns for integration tests also

  • Loading branch information...
1 parent d99b4ec commit 72c983466651e9e4deaff15486de0da3918ff4be @jeremy jeremy committed with wycats Jan 7, 2009
Showing with 5 additions and 2 deletions.
  1. +5 −2 actionpack/lib/action_controller/integration.rb
@@ -367,8 +367,10 @@ def process(method, path, parameters = nil, headers = nil)
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 @@ def process(method, path, parameters = nil, headers = nil)
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

0 comments on commit 72c9834

Please sign in to comment.