diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/routing/direct_url_helpers_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing/direct_url_helpers_test.rb b/actionpack/test/dispatch/routing/direct_url_helpers_test.rb index 56bb7f13b3..24e46758cc 100644 --- a/actionpack/test/dispatch/routing/direct_url_helpers_test.rb +++ b/actionpack/test/dispatch/routing/direct_url_helpers_test.rb @@ -212,4 +212,16 @@ class TestDirectUrlHelpers < ActionDispatch::IntegrationTest end end end + + def test_defining_inside_a_scope_raises_runtime_error + routes = ActionDispatch::Routing::RouteSet.new + + assert_raises RuntimeError do + routes.draw do + namespace :admin do + direct(:rubyonrails) { "http://www.rubyonrails.org" } + end + end + end + end end |