aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/activerecord
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-06-28 12:23:41 +0200
committerJosé Valim <jose.valim@gmail.com>2010-06-28 12:23:41 +0200
commit6d04fa6dc4865af1112c4d35a456a81008815ee7 (patch)
treee7003d8efd5c34509b5a35f6333f8fe7a862d45d /actionpack/test/activerecord
parent2002e5877efa40b336b70b707670e734c6389958 (diff)
downloadrails-6d04fa6dc4865af1112c4d35a456a81008815ee7.tar.gz
rails-6d04fa6dc4865af1112c4d35a456a81008815ee7.tar.bz2
rails-6d04fa6dc4865af1112c4d35a456a81008815ee7.zip
Deprecate the old router DSL. Since it is still used intensively across ActionPack test suite, patches that translates Rails internal tests to the new router DSL are welcome (note though that a few tests shouldn't be translated since they are testing exactly the old mapper API, like the ones in actionpack/test/controller/resource_test.rb and actionpack/test/controller/routing_test.rb)
Diffstat (limited to 'actionpack/test/activerecord')
-rw-r--r--actionpack/test/activerecord/polymorphic_routes_test.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/actionpack/test/activerecord/polymorphic_routes_test.rb b/actionpack/test/activerecord/polymorphic_routes_test.rb
index 6e1e6cdd20..90a1ef982c 100644
--- a/actionpack/test/activerecord/polymorphic_routes_test.rb
+++ b/actionpack/test/activerecord/polymorphic_routes_test.rb
@@ -408,18 +408,18 @@ class PolymorphicRoutesTest < ActionController::TestCase
def with_admin_test_routes(options = {})
with_routing do |set|
- set.draw do |map|
- map.namespace :admin do |admin|
- admin.resources :projects do |projects|
- projects.resources :tasks
- projects.resource :bid do |bid|
- bid.resources :tasks
+ set.draw do
+ namespace :admin do
+ resources :projects do
+ resources :tasks
+ resource :bid do
+ resources :tasks
end
end
- admin.resources :taxes do |taxes|
- taxes.resources :faxes
+ resources :taxes do
+ resources :faxes
end
- admin.resources :series
+ resources :series
end
end
@@ -430,12 +430,12 @@ class PolymorphicRoutesTest < ActionController::TestCase
def with_admin_and_site_test_routes(options = {})
with_routing do |set|
- set.draw do |map|
- map.namespace :admin do |admin|
- admin.resources :projects do |projects|
- projects.namespace :site do |site|
- site.resources :tasks do |tasks|
- tasks.resources :steps
+ set.draw do
+ namespace :admin do
+ resources :projects do
+ namespace :site do
+ resources :tasks do
+ resources :steps
end
end
end