aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/test_case.rb
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2012-06-01 17:42:33 +0200
committerPiotr Sarnacki <drogus@gmail.com>2012-06-01 17:45:06 +0200
commit60b4290f1b978d2220c913b99a6162e8f324f833 (patch)
tree2528b74b903d63d715a319d6e2d3152e4c5b77d0 /actionpack/lib/action_view/test_case.rb
parentafcc7cc301c92046c2a74e6e29b4d946292bd0a2 (diff)
downloadrails-60b4290f1b978d2220c913b99a6162e8f324f833.tar.gz
rails-60b4290f1b978d2220c913b99a6162e8f324f833.tar.bz2
rails-60b4290f1b978d2220c913b99a6162e8f324f833.zip
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
Diffstat (limited to 'actionpack/lib/action_view/test_case.rb')
-rw-r--r--actionpack/lib/action_view/test_case.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb
index fece499c94..53bde48e4d 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