diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2012-06-01 17:42:33 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-06-01 20:58:19 +0200 |
commit | f550d4db96b406efc91f92a9c8ebdcda7d407bc9 (patch) | |
tree | 06e7ddde6f54871b45236e2b6ea64dc5abb5adbc /actionpack/lib/action_view/test_case.rb | |
parent | 5b6b0df8c585326266275b2fb25cfdfce924fe9b (diff) | |
download | rails-f550d4db96b406efc91f92a9c8ebdcda7d407bc9.tar.gz rails-f550d4db96b406efc91f92a9c8ebdcda7d407bc9.tar.bz2 rails-f550d4db96b406efc91f92a9c8ebdcda7d407bc9.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.rb | 3 |
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 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 |