From d0b8f4c309beb009bfc4538a85ee17feb9b34436 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Sun, 31 Mar 2013 17:30:12 +0530 Subject: fix request methods test --- actionpack/test/controller/routing_test.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'actionpack/test/controller') 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 -- cgit v1.2.3