diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-24 15:41:19 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-09-27 11:19:21 -0300 |
commit | 24ef32fe93a701c0b65a0aedf7c361ff3364c42b (patch) | |
tree | 1a6929660b09d22487e6def648e4685a14a6ead7 | |
parent | cd681681e655b155b8f739d8042389a58be28111 (diff) | |
download | rails-24ef32fe93a701c0b65a0aedf7c361ff3364c42b.tar.gz rails-24ef32fe93a701c0b65a0aedf7c361ff3364c42b.tar.bz2 rails-24ef32fe93a701c0b65a0aedf7c361ff3364c42b.zip |
Ask is @controller is defined to avoid warning.
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/routing.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/routing.rb b/actionpack/lib/action_dispatch/testing/assertions/routing.rb index c5fed1fc8f..4293ed19e1 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/routing.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/routing.rb @@ -171,7 +171,7 @@ module ActionDispatch # ROUTES TODO: These assertions should really work in an integration context def method_missing(selector, *args, &block) - if @controller && @routes && @routes.named_routes.helpers.include?(selector) + if defined?(@controller) && @controller && @routes && @routes.named_routes.helpers.include?(selector) @controller.send(selector, *args, &block) else super |