Permalink
Browse files

Ask is @controller is defined to avoid warning.

  • Loading branch information...
1 parent cd68168 commit 24ef32fe93a701c0b65a0aedf7c361ff3364c42b @miloops miloops committed Sep 24, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/testing/assertions/routing.rb
@@ -171,7 +171,7 @@ def with_routing
# 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

0 comments on commit 24ef32f

Please sign in to comment.