diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-08-27 12:43:26 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-08-27 12:43:26 -0500 |
commit | ba5995dcd983498aea342fd06ccb6337f3bd15ab (patch) | |
tree | df3b39b34570d51090eecffe8e396355d07e297b /actionpack/lib/action_controller | |
parent | f3ed0de340f47c2f0cbccc70c40d3ff829a4b5ff (diff) | |
download | rails-ba5995dcd983498aea342fd06ccb6337f3bd15ab.tar.gz rails-ba5995dcd983498aea342fd06ccb6337f3bd15ab.tar.bz2 rails-ba5995dcd983498aea342fd06ccb6337f3bd15ab.zip |
Reset session in integration tests after changing routes to reload the middleware stack
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/testing/process.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/testing/process.rb b/actionpack/lib/action_controller/testing/process.rb index 6bc7d60d76..4185b803c5 100644 --- a/actionpack/lib/action_controller/testing/process.rb +++ b/actionpack/lib/action_controller/testing/process.rb @@ -249,6 +249,7 @@ module ActionController #:nodoc: temporary_routes = ActionController::Routing::RouteSet.new ActionController::Routing.module_eval { const_set :Routes, temporary_routes } + ActionController::Dispatcher.router = temporary_routes yield temporary_routes ensure @@ -256,6 +257,7 @@ module ActionController #:nodoc: ActionController::Routing.module_eval { remove_const :Routes } end ActionController::Routing.const_set(:Routes, real_routes) if real_routes + ActionController::Dispatcher.router = ActionController::Routing::Routes end end -end
\ No newline at end of file +end |