diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-08-05 22:47:01 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-09-05 13:44:37 +0200 |
commit | e6b93fa6db645d0acf18fc36d99ac8e13cb2091a (patch) | |
tree | b879397723e187c4a7af89fb4f08d2a673cbb51c /railties/test | |
parent | 7c5045452960c03354438377b524730dcda4df75 (diff) | |
download | rails-e6b93fa6db645d0acf18fc36d99ac8e13cb2091a.tar.gz rails-e6b93fa6db645d0acf18fc36d99ac8e13cb2091a.tar.bz2 rails-e6b93fa6db645d0acf18fc36d99ac8e13cb2091a.zip |
Removed deprecated router API from railties
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/initializers/i18n_test.rb | 4 | ||||
-rw-r--r-- | railties/test/application/loading_test.rb | 2 | ||||
-rw-r--r-- | railties/test/application/routing_test.rb | 16 | ||||
-rw-r--r-- | railties/test/railties/mounted_engine_test.rb | 2 | ||||
-rw-r--r-- | railties/test/railties/shared_tests.rb | 4 |
5 files changed, 14 insertions, 14 deletions
diff --git a/railties/test/application/initializers/i18n_test.rb b/railties/test/application/initializers/i18n_test.rb index 4baa8a8170..178b31cff3 100644 --- a/railties/test/application/initializers/i18n_test.rb +++ b/railties/test/application/initializers/i18n_test.rb @@ -74,7 +74,7 @@ en: YAML app_file 'config/routes.rb', <<-RUBY - AppTemplate::Application.routes.draw do |map| + AppTemplate::Application.routes.draw do match '/i18n', :to => lambda { |env| [200, {}, [I18n.t(:foo)]] } end RUBY @@ -147,4 +147,4 @@ en: assert_fallbacks :ca => [:ca, :"es-ES", :es, :'en-US', :en] end end -end
\ No newline at end of file +end diff --git a/railties/test/application/loading_test.rb b/railties/test/application/loading_test.rb index a2abf642b8..c340465e87 100644 --- a/railties/test/application/loading_test.rb +++ b/railties/test/application/loading_test.rb @@ -70,7 +70,7 @@ class LoadingTest < Test::Unit::TestCase MODEL app_file 'config/routes.rb', <<-RUBY - AppTemplate::Application.routes.draw do |map| + AppTemplate::Application.routes.draw do match '/load', :to => lambda { |env| [200, {}, Post.all] } match '/unload', :to => lambda { |env| [200, {}, []] } end diff --git a/railties/test/application/routing_test.rb b/railties/test/application/routing_test.rb index 53bb7868da..d0c6cb51ca 100644 --- a/railties/test/application/routing_test.rb +++ b/railties/test/application/routing_test.rb @@ -33,7 +33,7 @@ module ApplicationTests RUBY app_file 'config/routes.rb', <<-RUBY - AppTemplate::Application.routes.draw do |map| + AppTemplate::Application.routes.draw do match ':controller(/:action)' end RUBY @@ -91,7 +91,7 @@ module ApplicationTests RUBY app_file 'config/routes.rb', <<-RUBY - AppTemplate::Application.routes.draw do |map| + AppTemplate::Application.routes.draw do match ':controller(/:action)' end RUBY @@ -102,7 +102,7 @@ module ApplicationTests test "mount rack app" do app_file 'config/routes.rb', <<-RUBY - AppTemplate::Application.routes.draw do |map| + AppTemplate::Application.routes.draw do mount lambda { |env| [200, {}, [env["PATH_INFO"]]] }, :at => "/blog" # The line below is required because mount sometimes # fails when a resource route is added. @@ -132,7 +132,7 @@ module ApplicationTests RUBY app_file 'config/routes.rb', <<-RUBY - AppTemplate::Application.routes.draw do |map| + AppTemplate::Application.routes.draw do match ':controller(/:action)' end RUBY @@ -164,7 +164,7 @@ module ApplicationTests RUBY app_file 'config/routes.rb', <<-RUBY - AppTemplate::Application.routes.draw do |map| + AppTemplate::Application.routes.draw do match 'admin/foo', :to => 'admin/foo#index' match 'foo', :to => 'foo#index' end @@ -192,7 +192,7 @@ module ApplicationTests RUBY app_file 'config/routes.rb', <<-RUBY - AppTemplate::Application.routes.draw do |map| + AppTemplate::Application.routes.draw do match 'foo', :to => 'foo#bar' end RUBY @@ -223,7 +223,7 @@ module ApplicationTests end app_file 'config/routes.rb', <<-RUBY - AppTemplate::Application.routes.draw do |map| + AppTemplate::Application.routes.draw do match 'foo', :to => ::InitializeRackApp end RUBY @@ -240,7 +240,7 @@ module ApplicationTests RUBY app_file 'config/routes.rb', <<-RUBY - AppTemplate::Application.routes.draw do |map| + AppTemplate::Application.routes.draw do resources :yazilar end RUBY diff --git a/railties/test/railties/mounted_engine_test.rb b/railties/test/railties/mounted_engine_test.rb index 36dd01198f..73b7e5b2e0 100644 --- a/railties/test/railties/mounted_engine_test.rb +++ b/railties/test/railties/mounted_engine_test.rb @@ -14,7 +14,7 @@ module ApplicationTests @plugin = engine "blog" app_file 'config/routes.rb', <<-RUBY - AppTemplate::Application.routes.draw do |map| + AppTemplate::Application.routes.draw do match "/engine_route" => "application_generating#engine_route" match "/engine_route_in_view" => "application_generating#engine_route_in_view" match "/url_for_engine_route" => "application_generating#url_for_engine_route" diff --git a/railties/test/railties/shared_tests.rb b/railties/test/railties/shared_tests.rb index 6aae17c237..068ea932e2 100644 --- a/railties/test/railties/shared_tests.rb +++ b/railties/test/railties/shared_tests.rb @@ -178,7 +178,7 @@ module RailtiesTest RUBY app_file "config/routes.rb", <<-RUBY - AppTemplate::Application.routes.draw do |map| + AppTemplate::Application.routes.draw do match 'foo', :to => 'foo#index' end RUBY @@ -192,7 +192,7 @@ module RailtiesTest RUBY @plugin.write "config/routes.rb", <<-RUBY - Rails.application.routes.draw do |map| + Rails.application.routes.draw do match 'foo', :to => 'bar#index' match 'bar', :to => 'bar#index' end |