diff options
-rw-r--r-- | actionview/lib/action_view/test_case.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/test_case.rb b/actionview/lib/action_view/test_case.rb index e14f7aaec7..3a75633743 100644 --- a/actionview/lib/action_view/test_case.rb +++ b/actionview/lib/action_view/test_case.rb @@ -284,7 +284,7 @@ module ActionView def respond_to_missing?(name, include_private = false) begin - routes = @controller.respond_to?(:_routes) && @controller._routes + routes = defined?(@controller) && @controller.respond_to?(:_routes) && @controller._routes rescue # Don't call routes, if there is an error on _routes call end |