aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-03 00:17:17 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-04 11:58:41 -0300
commit1f3b0a8609c00278b9a10076040ac9c90a9cc4a6 (patch)
treebdb35eb971f122150a392ac51a531719c8a80d8f /actionpack/test/dispatch/routing_test.rb
parent4b19d5b7bcdf4f11bd1e2e9ed2149a958e338c01 (diff)
downloadrails-1f3b0a8609c00278b9a10076040ac9c90a9cc4a6.tar.gz
rails-1f3b0a8609c00278b9a10076040ac9c90a9cc4a6.tar.bz2
rails-1f3b0a8609c00278b9a10076040ac9c90a9cc4a6.zip
Remove deprecated support to define routes with `:to` option that
doesn't contain `#`
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb34
1 files changed, 4 insertions, 30 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index aae95fb355..450681c356 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -3331,30 +3331,6 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
assert_equal 'comments#index', @response.body
end
- def test_mix_symbol_to_controller_action
- assert_deprecated do
- draw do
- get '/projects', controller: 'project_files',
- action: 'index',
- to: :show
- end
- end
- get '/projects'
- assert_equal 'project_files#show', @response.body
- end
-
- def test_mix_string_to_controller_action_no_hash
- assert_deprecated do
- draw do
- get '/projects', controller: 'project_files',
- action: 'index',
- to: 'show'
- end
- end
- get '/projects'
- assert_equal 'show#index', @response.body
- end
-
def test_shallow_path_and_prefix_are_not_added_to_non_shallow_routes
draw do
scope shallow_path: 'projects', shallow_prefix: 'project' do
@@ -3629,15 +3605,13 @@ class TestNamespaceWithControllerOption < ActionDispatch::IntegrationTest
assert_match(/Missing :controller/, ex.message)
end
- def test_missing_action
+ def test_missing_controller_with_to
ex = assert_raises(ArgumentError) {
- assert_deprecated do
- draw do
- get '/foo/bar', :to => 'foo'
- end
+ draw do
+ get '/foo/bar', :to => 'foo'
end
}
- assert_match(/Missing :action/, ex.message)
+ assert_match(/Missing :controller/, ex.message)
end
def test_missing_action_on_hash