diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-02-24 16:01:03 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-02-25 17:53:00 -0800 |
commit | 226dfc2681c98deaf14e4ae82e973d1d5caedd68 (patch) | |
tree | df761036bb714f3b9c10bb1eced20322aad953a7 /actionpack/lib/action_dispatch/testing/integration.rb | |
parent | 76237f163ff7ad2a64af926030e3449c547cafa2 (diff) | |
download | rails-226dfc2681c98deaf14e4ae82e973d1d5caedd68.tar.gz rails-226dfc2681c98deaf14e4ae82e973d1d5caedd68.tar.bz2 rails-226dfc2681c98deaf14e4ae82e973d1d5caedd68.zip |
WIP: Remove the global router
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/integration.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/integration.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index 14c7ff642b..3b9d8b0318 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -188,11 +188,11 @@ module ActionDispatch unless defined? @named_routes_configured # install the named routes in this session instance. klass = singleton_class - ActionDispatch::Routing::Routes.install_helpers(klass) + # ActionDispatch::Routing::Routes.install_helpers(klass) # the helpers are made protected by default--we make them public for # easier access during testing and troubleshooting. - klass.module_eval { public *ActionDispatch::Routing::Routes.named_routes.helpers } + # klass.module_eval { public *ActionDispatch::Routing::Routes.named_routes.helpers } @named_routes_configured = true end end @@ -224,9 +224,13 @@ module ActionDispatch # Returns the URL for the given options, according to the rules specified # in the application's routes. def url_for(options) + # ROUTES TODO: @app.router is not guaranteed to exist, so a generic Rack + # application will not work here. This means that a generic Rack application + # integration test cannot call url_for, since the application will not have + # #router on it. controller ? controller.url_for(options) : - generic_url_rewriter.rewrite(options) + generic_url_rewriter.rewrite(SharedTestRoutes, options) end private |