aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/testing/assertions
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-07-29 12:15:04 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-07-29 12:15:04 -0700
commitf889831ed65bea14b6b687bdaa4012d73d81b2a6 (patch)
treeb51d7887d344378d7aaaec1b664731987e9f824a /actionpack/lib/action_dispatch/testing/assertions
parent0088b08dcaf16176c8f9364d1d786f0c3728d369 (diff)
downloadrails-f889831ed65bea14b6b687bdaa4012d73d81b2a6.tar.gz
rails-f889831ed65bea14b6b687bdaa4012d73d81b2a6.tar.bz2
rails-f889831ed65bea14b6b687bdaa4012d73d81b2a6.zip
ask the named routes collection if the route is defined
we should not be accessing internals to figure out if a method is defined.
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/assertions')
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions/routing.rb2
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 f1f998d932..2cf38a9c2d 100644
--- a/actionpack/lib/action_dispatch/testing/assertions/routing.rb
+++ b/actionpack/lib/action_dispatch/testing/assertions/routing.rb
@@ -165,7 +165,7 @@ module ActionDispatch
# ROUTES TODO: These assertions should really work in an integration context
def method_missing(selector, *args, &block)
- if defined?(@controller) && @controller && @routes && @routes.named_routes.helpers.include?(selector)
+ if defined?(@controller) && @controller && @routes && @routes.named_routes.route_defined?(selector)
@controller.send(selector, *args, &block)
else
super