From 71c9337f45f9c5461cbc6ddf6cab764ad0f82c3b Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Thu, 18 Mar 2010 15:52:43 -0700 Subject: All tests pass without memoizing view_context --- actionpack/lib/action_dispatch/testing/assertions/routing.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/testing/assertions/routing.rb b/actionpack/lib/action_dispatch/testing/assertions/routing.rb index eb28cd5107..de833bb3ca 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/routing.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/routing.rb @@ -154,15 +154,14 @@ module ActionDispatch # TODO: Make this unnecessary if @controller @controller.singleton_class.send(:include, @router.url_helpers) - @controller.class._helper_serial += 1 - @controller.view_context.singleton_class.send(:include, @router.url_helpers) + @controller.class._helper_serial = AbstractController::Helpers.next_serial + 1 end yield @router ensure @router = old_routes if @controller @controller = old_controller - @controller.class._helper_serial += 1 if @controller + @controller.class._helper_serial = AbstractController::Helpers.next_serial + 1 if @controller end end -- cgit v1.2.3