aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2013-03-31 17:30:12 +0530
committerVipul A M <vipulnsward@gmail.com>2013-03-31 22:11:23 +0530
commitd0b8f4c309beb009bfc4538a85ee17feb9b34436 (patch)
treedff2134c4bce47bfe286941822cb66dcd276eea3 /actionpack/test/controller
parent3b0b573ac3ecbec5b1fa021abbe86b267bbefb8c (diff)
downloadrails-d0b8f4c309beb009bfc4538a85ee17feb9b34436.tar.gz
rails-d0b8f4c309beb009bfc4538a85ee17feb9b34436.tar.bz2
rails-d0b8f4c309beb009bfc4538a85ee17feb9b34436.zip
fix request methods test
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/routing_test.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 978c5aa7ac..f735564305 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -715,17 +715,13 @@ class LegacyRouteSetTests < ActiveSupport::TestCase
def setup_request_method_routes_for(method)
rs.draw do
- match '/match' => 'books#get', :via => :get
- match '/match' => 'books#post', :via => :post
- match '/match' => 'books#put', :via => :put
- match '/match' => 'books#patch', :via => :patch
- match '/match' => 'books#delete', :via => :delete
+ match '/match' => "books##{method}", :via => method.to_sym
end
end
%w(GET PATCH POST PUT DELETE).each do |request_method|
define_method("test_request_method_recognized_with_#{request_method}") do
- setup_request_method_routes_for(request_method)
+ setup_request_method_routes_for(request_method.downcase)
params = rs.recognize_path("/match", :method => request_method)
assert_equal request_method.downcase, params[:action]
end