From 50decfbc0e2e58961cc3665710922860d38ee2fb Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Fri, 24 Sep 2010 17:07:54 -0300 Subject: _routes must be inside @controller conditional. --- actionpack/lib/action_dispatch/testing/assertions/routing.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/testing/assertions/routing.rb') diff --git a/actionpack/lib/action_dispatch/testing/assertions/routing.rb b/actionpack/lib/action_dispatch/testing/assertions/routing.rb index 0cdc69760b..1390b74a95 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/routing.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/routing.rb @@ -148,6 +148,7 @@ module ActionDispatch 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 @@ module ActionDispatch include _routes.url_helpers end end - _routes = @routes yield @routes ensure @routes = old_routes -- cgit v1.2.3