aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/routing_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-05-21 11:00:43 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-05-21 11:00:43 -0700
commit513a0525c24c2944630acfa465b22cd2f4601adf (patch)
treea406f0a86b4199fcf21287e7726311ea7918f306 /actionpack/test/controller/routing_test.rb
parentd2901f0fc4270a765717ad572d559dc49a56b3a8 (diff)
parentdde5b8737bf7ec666f96ae04479074dfae7a63d9 (diff)
downloadrails-513a0525c24c2944630acfa465b22cd2f4601adf.tar.gz
rails-513a0525c24c2944630acfa465b22cd2f4601adf.tar.bz2
rails-513a0525c24c2944630acfa465b22cd2f4601adf.zip
Merge pull request #2549 from trek/RoutingErrorForMissingControllers
When a route references a missing controller, raise ActionController::RoutingError with clearer message
Diffstat (limited to 'actionpack/test/controller/routing_test.rb')
-rw-r--r--actionpack/test/controller/routing_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index cd91064ab8..2f552c3a5a 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -1037,6 +1037,16 @@ class RouteSetTest < ActiveSupport::TestCase
end
end
+ def test_route_error_with_missing_controller
+ set.draw do
+ get "/people" => "missing#index"
+ end
+
+ assert_raise(ActionController::RoutingError) {
+ set.recognize_path("/people", :method => :get)
+ }
+ end
+
def test_recognize_with_encoded_id_and_regex
set.draw do
get 'page/:id' => 'pages#show', :id => /[a-zA-Z0-9\+]+/