aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/test_case.rb
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-03-08 21:08:31 -0800
committerwycats <wycats@gmail.com>2010-03-09 10:20:56 -0800
commitde79525d045b6ea2d83f325bdeeb9380510d045c (patch)
treec4b48947e98ced7b94b8332f01e4da626de93237 /actionpack/lib/action_controller/test_case.rb
parentc507e16dba844c7b066d145bfd5c5d23e7a9c5ad (diff)
downloadrails-de79525d045b6ea2d83f325bdeeb9380510d045c.tar.gz
rails-de79525d045b6ea2d83f325bdeeb9380510d045c.tar.bz2
rails-de79525d045b6ea2d83f325bdeeb9380510d045c.zip
Get rid of the instance-level URL rewriter
Diffstat (limited to 'actionpack/lib/action_controller/test_case.rb')
-rw-r--r--actionpack/lib/action_controller/test_case.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index 7e0a833dfa..c43e560ac1 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -339,9 +339,13 @@ module ActionController
def build_request_uri(action, parameters)
unless @request.env["PATH_INFO"]
options = @controller.__send__(:url_options).merge(parameters)
- options.update(:only_path => true, :action => action, :relative_url_root => nil)
- rewriter = ActionController::UrlRewriter.new(@request, parameters)
+ options.update(
+ :only_path => true,
+ :action => action,
+ :relative_url_root => nil,
+ :_path_segments => @request.symbolized_path_parameters)
+ rewriter = ActionController::UrlRewriter
url, query_string = rewriter.rewrite(@router, options).split("?", 2)
@request.env["SCRIPT_NAME"] = @controller.config.relative_url_root