Permalink
Browse files

Use `get` instead of `match`

Because Rails4 doesn't support `match`.
  • Loading branch information...
1 parent 456f99f commit 87f0848f07d89637caeb17a350dde432218d997b @tricknotes tricknotes committed Mar 1, 2013
@@ -1,5 +1,5 @@
TestRailsAdapter::Application.routes.draw do
filter :uuid, :pagination ,:locale, :extension
- match "/" => "tests#index"
- match "/foo/:id" => "tests#show", :as => 'foo'
+ get "/" => "tests#index"
+ get "/foo/:id" => "tests#show", :as => 'foo'
end
@@ -17,7 +17,7 @@ def setup
@routes = draw_routes do
filter :uuid, :pagination ,:locale, :extension
- match 'some', :to => 'some#index'
+ get 'some', :to => 'some#index'
end
end
@@ -6,9 +6,9 @@ class ForceExtensionTest < Test::Unit::TestCase
def setup
@routes = draw_routes do
filter :extension, :exclude => %r(^/(admin|$))
- match '/', :to => 'some#index'
- match 'some/:id(.:format)', :to => 'some#show'
- match '/admin/some/new', :to => 'some#new'
+ get '/', :to => 'some#index'
+ get 'some/:id(.:format)', :to => 'some#show'
+ get '/admin/some/new', :to => 'some#new'
end
@params = { :controller => 'some', :action => 'show', :id => '1' }
end
@@ -15,9 +15,9 @@ def setup
@routes = draw_routes do
filter :locale, :exclude => /^\/themes/
- match 'products/:id', :to => 'some#show'
- match '/', :to => 'some#index'
- match '/themes/products/new', :to => 'some#new'
+ get 'products/:id', :to => 'some#show'
+ get '/', :to => 'some#index'
+ get '/themes/products/new', :to => 'some#new'
end
end
@@ -6,7 +6,7 @@ class PaginationTest < Test::Unit::TestCase
def setup
@routes = draw_routes do
filter :pagination
- match 'some', :to => 'some#index'
+ get 'some', :to => 'some#index'
end
@params = { :controller => 'some', :action => 'index', :page => 2 }
end
@@ -6,7 +6,7 @@ class UuidTest < Test::Unit::TestCase
def setup
@routes = draw_routes do
filter :uuid
- match 'some/:id', :to => 'some#show'
+ get 'some/:id', :to => 'some#show'
end
@uuid = 'd00fbbd1-82b6-4c1a-a57d-098d529d6854'
@params = { :controller => 'some', :action => 'show', :id => '1', :uuid => uuid }
View
@@ -47,5 +47,7 @@ def match(pattern, options)
options.merge!(:controller => controller, :action => action)
connect(pattern, options)
end
+
+ alias get match
end
end

0 comments on commit 87f0848

Please sign in to comment.