aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorTrek Glowacki <trek.glowacki@gmail.com>2011-08-16 16:27:07 -0400
committerTrek Glowacki <trek.glowacki@gmail.com>2011-08-16 16:27:07 -0400
commitdde5b8737bf7ec666f96ae04479074dfae7a63d9 (patch)
tree5aac10080bb43e47b24d54acb199f665784299a1 /actionpack/test
parent590239156714c03ad525b2248a11a3f34da3aa6a (diff)
downloadrails-dde5b8737bf7ec666f96ae04479074dfae7a63d9.tar.gz
rails-dde5b8737bf7ec666f96ae04479074dfae7a63d9.tar.bz2
rails-dde5b8737bf7ec666f96ae04479074dfae7a63d9.zip
When a route references a missing controller, raise ActionController::RoutingError with a clearer message
Diffstat (limited to 'actionpack/test')
-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 5bf68decca..3602c8a9e3 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -902,6 +902,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
match 'page/:id' => 'pages#show', :id => /[a-zA-Z0-9\+]+/