From f550d4db96b406efc91f92a9c8ebdcda7d407bc9 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Fri, 1 Jun 2012 17:42:33 +0200 Subject: Allow to use mounted helpers in ActionView::TestCase Similarly to 6525002, this allows to use routes helpers for mounted helpers, but this time in ActionView::TestCase --- actionpack/lib/action_view/test_case.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb index 98ce21ce1d..658a503f7f 100644 --- a/actionpack/lib/action_view/test_case.rb +++ b/actionpack/lib/action_view/test_case.rb @@ -229,7 +229,8 @@ module ActionView def method_missing(selector, *args) if @controller.respond_to?(:_routes) && - @controller._routes.named_routes.helpers.include?(selector) + ( @controller._routes.named_routes.helpers.include?(selector) || + @controller._routes.mounted_helpers.method_defined?(selector) ) @controller.__send__(selector, *args) else super -- cgit v1.2.3