Browse files

Fixed url_for(nil) in functional tests #1116 [Alisdair McDiarmid]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1175 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 68dfe3e commit 5e3b8b36fa1524bd9b0c66af07732f8950ccf38e @dhh dhh committed Apr 17, 2005
Showing with 4 additions and 1 deletion.
  1. +2 −0 actionpack/CHANGELOG
  2. +2 −1 actionpack/lib/action_controller/test_process.rb
View
2 actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fixed url_for(nil) in functional tests #1116 [Alisdair McDiarmid]
+
* Fixed error handling of broken layouts #1115 [Michael Schubert]
* Changed render_partial to take local assigns as the second parameter instead of an explicit object and then the assigns. So the API changes from:
View
3 actionpack/lib/action_controller/test_process.rb
@@ -254,7 +254,8 @@ class TestCase #:nodoc:
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.path_parameters = { :controller => @controller.class.controller_path,
+ :action => action.to_s }
@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

0 comments on commit 5e3b8b3

Please sign in to comment.