diff options
Diffstat (limited to 'railties/test/application/route_inspect_test.rb')
-rw-r--r-- | railties/test/application/route_inspect_test.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/railties/test/application/route_inspect_test.rb b/railties/test/application/route_inspect_test.rb index 6393cfff4b..59dfe2ff75 100644 --- a/railties/test/application/route_inspect_test.rb +++ b/railties/test/application/route_inspect_test.rb @@ -78,47 +78,47 @@ module ApplicationTests root :to => 'pages#main' end output = @inspector.format @set.routes - assert_equal ["root / pages#main"], output + assert_equal ["root GET / pages#main"], output end def test_inspect_routes_shows_dynamic_action_route @set.draw do - match 'api/:action' => 'api' + get 'api/:action' => 'api' end output = @inspector.format @set.routes - assert_equal [" /api/:action(.:format) api#:action"], output + assert_equal [" GET /api/:action(.:format) api#:action"], output end def test_inspect_routes_shows_controller_and_action_only_route @set.draw do - match ':controller/:action' + get ':controller/:action' end output = @inspector.format @set.routes - assert_equal [" /:controller/:action(.:format) :controller#:action"], output + assert_equal [" GET /:controller/:action(.:format) :controller#:action"], output end def test_inspect_routes_shows_controller_and_action_route_with_constraints @set.draw do - match ':controller(/:action(/:id))', :id => /\d+/ + get ':controller(/:action(/:id))', :id => /\d+/ end output = @inspector.format @set.routes - assert_equal [" /:controller(/:action(/:id))(.:format) :controller#:action {:id=>/\\d+/}"], output + assert_equal [" GET /:controller(/:action(/:id))(.:format) :controller#:action {:id=>/\\d+/}"], output end def test_rake_routes_shows_route_with_defaults @set.draw do - match 'photos/:id' => 'photos#show', :defaults => {:format => 'jpg'} + get 'photos/:id' => 'photos#show', :defaults => {:format => 'jpg'} end output = @inspector.format @set.routes - assert_equal [%Q[ /photos/:id(.:format) photos#show {:format=>"jpg"}]], output + assert_equal [%Q[ GET /photos/:id(.:format) photos#show {:format=>"jpg"}]], output end def test_rake_routes_shows_route_with_constraints @set.draw do - match 'photos/:id' => 'photos#show', :id => /[A-Z]\d{5}/ + get 'photos/:id' => 'photos#show', :id => /[A-Z]\d{5}/ end output = @inspector.format @set.routes - assert_equal [" /photos/:id(.:format) photos#show {:id=>/[A-Z]\\d{5}/}"], output + assert_equal [" GET /photos/:id(.:format) photos#show {:id=>/[A-Z]\\d{5}/}"], output end class RackApp @@ -128,10 +128,10 @@ module ApplicationTests def test_rake_routes_shows_route_with_rack_app @set.draw do - match 'foo/:id' => RackApp, :id => /[A-Z]\d{5}/ + get 'foo/:id' => RackApp, :id => /[A-Z]\d{5}/ end output = @inspector.format @set.routes - assert_equal [" /foo/:id(.:format) #{RackApp.name} {:id=>/[A-Z]\\d{5}/}"], output + assert_equal [" GET /foo/:id(.:format) #{RackApp.name} {:id=>/[A-Z]\\d{5}/}"], output end def test_rake_routes_shows_route_with_rack_app_nested_with_dynamic_constraints @@ -153,7 +153,7 @@ module ApplicationTests def test_rake_routes_dont_show_app_mounted_in_assets_prefix @set.draw do - match '/sprockets' => RackApp + get '/sprockets' => RackApp end output = @inspector.format @set.routes assert_no_match(/RackApp/, output.first) |