aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/routing_test.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-12-11 00:01:22 -0600
committerJoshua Peek <josh@joshpeek.com>2009-12-11 00:01:22 -0600
commit588225f8852c4b60bfba38f16d8797a41e175400 (patch)
treee3272d8c2e196b5ac89ab2ccd465cebf521b16d6 /actionpack/test/controller/routing_test.rb
parent2f90d700498294a9a4da0baa5317c0e6feaaf176 (diff)
downloadrails-588225f8852c4b60bfba38f16d8797a41e175400.tar.gz
rails-588225f8852c4b60bfba38f16d8797a41e175400.tar.bz2
rails-588225f8852c4b60bfba38f16d8797a41e175400.zip
Remove fancy method not allowed resource exceptions since they are
too much of a hack
Diffstat (limited to 'actionpack/test/controller/routing_test.rb')
-rw-r--r--actionpack/test/controller/routing_test.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index d52da58807..a9a970d67d 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -976,7 +976,7 @@ class RouteSetTest < ActiveSupport::TestCase
params = set.recognize_path("/people", :method => :put)
assert_equal("update", params[:action])
- assert_raise(ActionController::NotImplemented) {
+ assert_raise(ActionController::RoutingError) {
set.recognize_path("/people", :method => :bacon)
}
@@ -992,12 +992,9 @@ class RouteSetTest < ActiveSupport::TestCase
assert_equal("destroy", params[:action])
assert_equal("5", params[:id])
- begin
+ assert_raise(ActionController::RoutingError) {
set.recognize_path("/people/5", :method => :post)
- flunk 'Should have raised MethodNotAllowed'
- rescue ActionController::MethodNotAllowed => e
- assert_equal [:get, :put, :delete], e.allowed_methods
- end
+ }
end
def test_recognize_with_alias_in_conditions