diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -44,7 +44,7 @@ module ActionController
 
     def assign_parameters(routes, controller_path, action, parameters = {})
       parameters = parameters.symbolize_keys
-      extra_keys = routes.extra_keys(parameters.merge(:controller => controller_path, :action => action))
+      generated_path, extra_keys = routes.generate_extras(parameters.merge(:controller => controller_path, :action => action))
       non_path_parameters = {}
       path_parameters = {}
 
@@ -97,6 +97,7 @@ module ActionController
         @env['rack.input'] = StringIO.new(data)
       end
 
+      @env["PATH_INFO"] ||= generated_path
       path_parameters[:controller] = controller_path
       path_parameters[:action] = action
default `PATH_INFO` to the generated path

we were already generating a path in the previous code (it was just not
returned), so lets just use the already computed path to popluate the
PATH_INFO header