diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-26 21:43:25 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-26 21:43:25 +0000 |
commit | 9fb6a54a164e7a1b64cf36efcba657c4215858b8 (patch) | |
tree | 7eefb985a625d09942ad73143fe1374dbe3392fc /actionpack/lib | |
parent | f569a14318e25005dfe27a51b3950c426581f18f (diff) | |
download | rails-9fb6a54a164e7a1b64cf36efcba657c4215858b8.tar.gz rails-9fb6a54a164e7a1b64cf36efcba657c4215858b8.tar.bz2 rails-9fb6a54a164e7a1b64cf36efcba657c4215858b8.zip |
Added fourth option to process in test cases to specify the content of the flash #949 [Jamis Buck]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1009 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/test_process.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb index 3d9a335eff..6a7fe64a32 100644 --- a/actionpack/lib/action_controller/test_process.rb +++ b/actionpack/lib/action_controller/test_process.rb @@ -251,12 +251,13 @@ module Test class TestCase #:nodoc: private # execute the request and set/volley the response - def process(action, parameters = nil, session = nil) + def process(action, parameters = nil, session = nil, flash = nil) @request.env['REQUEST_METHOD'] ||= "GET" @request.action = action.to_s @request.path_parameters = { :controller => @controller.class.controller_path } @request.parameters.update(parameters) unless parameters.nil? @request.session = ActionController::TestSession.new(session) unless session.nil? + @request.session["flash"] = ActionController::Flash::FlashHash.new.update(flash) if flash @controller.process(@request, @response) end |