Permalink
Browse files

_routes must be inside @controller conditional.

  • Loading branch information...
1 parent 023c202 commit 50decfbc0e2e58961cc3665710922860d38ee2fb @miloops miloops committed Sep 24, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/testing/assertions/routing.rb
View
2 actionpack/lib/action_dispatch/testing/assertions/routing.rb
@@ -148,6 +148,7 @@ def with_routing
old_routes, @routes = @routes, ActionDispatch::Routing::RouteSet.new
if defined?(@controller) && @controller
old_controller, @controller = @controller, @controller.clone
+ _routes = @routes
# Unfortunately, there is currently an abstraction leak between AC::Base
# and AV::Base which requires having the URL helpers in both AC and AV.
@@ -160,7 +161,6 @@ def with_routing
include _routes.url_helpers
end
end
- _routes = @routes
yield @routes
ensure
@routes = old_routes

0 comments on commit 50decfb

Please sign in to comment.