diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-08-05 15:44:23 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-09-05 13:44:36 +0200 |
commit | b3eb26a161acb23781e55fc6c37b948f160cd9b5 (patch) | |
tree | 3c8e43a17dc5fe06eb3b4552d04d479863161fb5 /actionpack/test/controller/test_test.rb | |
parent | 91fec0d24d50d3b3e90c48b2501ca913544781cc (diff) | |
download | rails-b3eb26a161acb23781e55fc6c37b948f160cd9b5.tar.gz rails-b3eb26a161acb23781e55fc6c37b948f160cd9b5.tar.bz2 rails-b3eb26a161acb23781e55fc6c37b948f160cd9b5.zip |
Removed deprecated RouteSet API, still many tests fail
Diffstat (limited to 'actionpack/test/controller/test_test.rb')
-rw-r--r-- | actionpack/test/controller/test_test.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb index e959b41219..0dd49cef70 100644 --- a/actionpack/test/controller/test_test.rb +++ b/actionpack/test/controller/test_test.rb @@ -135,6 +135,11 @@ XML @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new @request.env['PATH_INFO'] = nil + @routes = ActionDispatch::Routing::RouteSet.new.tap do |r| + r.draw do + match ':controller(/:action(/:id))' + end + end end def test_raw_post_handling @@ -454,7 +459,7 @@ XML def test_assert_routing_with_method with_routing do |set| - set.draw { |map| map.resources(:content) } + set.draw { resources(:content) } assert_routing({ :method => 'post', :path => 'content' }, { :controller => 'content', :action => 'create' }) end end @@ -465,7 +470,7 @@ XML def test_assert_routing_with_glob with_routing do |set| - set.draw { |map| match('*path' => "pages#show") } + set.draw { match('*path' => "pages#show") } assert_routing('/company/about', { :controller => 'pages', :action => 'show', :path => 'company/about' }) end end @@ -487,7 +492,7 @@ XML def test_array_path_parameter_handled_properly with_routing do |set| - set.draw do |map| + set.draw do match 'file/*path', :to => 'test_test/test#test_params' match ':controller/:action' end @@ -702,7 +707,7 @@ class NamedRoutesControllerTest < ActionController::TestCase def test_should_be_able_to_use_named_routes_before_a_request_is_done with_routing do |set| - set.draw { |map| resources :contents } + set.draw { resources :contents } assert_equal 'http://test.host/contents/new', new_content_url assert_equal 'http://test.host/contents/1', content_url(:id => 1) end |