diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-05-02 02:15:09 -0700 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-05-02 02:15:09 -0700 |
commit | 72160d9f89481ea60c8268ff026099f07b1e5ed6 (patch) | |
tree | 950b7516323658c7012e3ca742b7bd9930a83aa7 /actionpack/lib/action_controller/testing | |
parent | ad2a1b5cb1afb0ea810cfdcac2ba1be95c55f1aa (diff) | |
download | rails-72160d9f89481ea60c8268ff026099f07b1e5ed6.tar.gz rails-72160d9f89481ea60c8268ff026099f07b1e5ed6.tar.bz2 rails-72160d9f89481ea60c8268ff026099f07b1e5ed6.zip |
Implement FooController.action(:name)
* Rails actions are now Rack endpoints, and can be retrieved
via FooController.action(name) and called with an env
* Updated some tests that relied on the old internal
#process/#call implementation
Diffstat (limited to 'actionpack/lib/action_controller/testing')
-rw-r--r-- | actionpack/lib/action_controller/testing/process.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/testing/process.rb b/actionpack/lib/action_controller/testing/process.rb index 8315a160ad..3aad94cc10 100644 --- a/actionpack/lib/action_controller/testing/process.rb +++ b/actionpack/lib/action_controller/testing/process.rb @@ -131,7 +131,11 @@ module ActionController #:nodoc: @request.session["flash"] = ActionController::Flash::FlashHash.new.update(flash) if flash build_request_uri(action, parameters) + @request.env["action_controller.rescue.request"] = @request + @request.env["action_controller.rescue.request"] = @response + Base.class_eval { include ProcessWithTest } unless Base < ProcessWithTest + @controller.action_name = action.to_s @controller.process(@request, @response) end |