Skip to content

Commit

Permalink
Clean up some straggling build failures
Browse files Browse the repository at this point in the history
  • Loading branch information
wycats authored and nordringrayhide committed May 2, 2012
1 parent 8b66215 commit 06d1542
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion actionmailer/test/i18n_with_controller_test.rb
Expand Up @@ -24,7 +24,7 @@ def send_mail
class ActionMailerI18nWithControllerTest < ActionDispatch::IntegrationTest
Routes = ActionDispatch::Routing::RouteSet.new
Routes.draw do
match ':controller(/:action(/:id))'
get ':controller(/:action(/:id))'
end

def app
Expand Down
4 changes: 2 additions & 2 deletions actionmailer/test/url_test.rb
Expand Up @@ -57,8 +57,8 @@ def test_signed_up_with_url
UrlTestMailer.delivery_method = :test

AppRoutes.draw do
match ':controller(/:action(/:id))'
match '/welcome' => "foo#bar", :as => "welcome"
get ':controller(/:action(/:id))'
get '/welcome' => "foo#bar", :as => "welcome"
end

expected = new_mail
Expand Down
14 changes: 7 additions & 7 deletions railties/test/application/route_inspect_test.rb
Expand Up @@ -78,47 +78,47 @@ def test_inspect_routes_shows_root_route
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
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
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
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
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
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
Expand All @@ -131,7 +131,7 @@ def test_rake_routes_shows_route_with_rack_app
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
Expand Down

0 comments on commit 06d1542

Please sign in to comment.