aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-08-28 12:35:47 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-08-28 12:35:47 -0700
commit766fb54c8f112aa2ae82a031a4bb1b0d040a4e84 (patch)
treefe1225cfcea1164bc8c4e899e29bdfe6865a3b5b
parent082c377954fda43ad3b84abe5864e3e181f8e757 (diff)
downloadrails-766fb54c8f112aa2ae82a031a4bb1b0d040a4e84.tar.gz
rails-766fb54c8f112aa2ae82a031a4bb1b0d040a4e84.tar.bz2
rails-766fb54c8f112aa2ae82a031a4bb1b0d040a4e84.zip
Fix indentation
-rw-r--r--actionpack/test/controller/routing_test.rb42
1 files changed, 20 insertions, 22 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 1a802c464f..f480e6dbe4 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -1298,30 +1298,28 @@ uses_mocha 'LegacyRouteSet, Route, RouteSet and RouteLoading' do
end
def test_recognize_array_of_methods
- begin
- Object.const_set(:BooksController, Class.new(ActionController::Base))
- rs.draw do |r|
- r.connect '/match', :controller => 'books', :action => 'get_or_post', :conditions => { :method => [:get, :post] }
- r.connect '/match', :controller => 'books', :action => 'not_get_or_post'
- end
-
- @request = ActionController::TestRequest.new
- @request.env["REQUEST_METHOD"] = 'POST'
- @request.request_uri = "/match"
- assert_nothing_raised { rs.recognize(@request) }
- assert_equal 'get_or_post', @request.path_parameters[:action]
-
- # have to recreate or else the RouteSet uses a cached version:
- @request = ActionController::TestRequest.new
- @request.env["REQUEST_METHOD"] = 'PUT'
- @request.request_uri = "/match"
- assert_nothing_raised { rs.recognize(@request) }
- assert_equal 'not_get_or_post', @request.path_parameters[:action]
- ensure
- Object.send(:remove_const, :BooksController) rescue nil
- end
+ Object.const_set(:BooksController, Class.new(ActionController::Base))
+ rs.draw do |r|
+ r.connect '/match', :controller => 'books', :action => 'get_or_post', :conditions => { :method => [:get, :post] }
+ r.connect '/match', :controller => 'books', :action => 'not_get_or_post'
end
+ @request = ActionController::TestRequest.new
+ @request.env["REQUEST_METHOD"] = 'POST'
+ @request.request_uri = "/match"
+ assert_nothing_raised { rs.recognize(@request) }
+ assert_equal 'get_or_post', @request.path_parameters[:action]
+
+ # have to recreate or else the RouteSet uses a cached version:
+ @request = ActionController::TestRequest.new
+ @request.env["REQUEST_METHOD"] = 'PUT'
+ @request.request_uri = "/match"
+ assert_nothing_raised { rs.recognize(@request) }
+ assert_equal 'not_get_or_post', @request.path_parameters[:action]
+ ensure
+ Object.send(:remove_const, :BooksController) rescue nil
+ end
+
def test_subpath_recognized
Object.const_set(:SubpathBooksController, Class.new(ActionController::Base))