aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-09-03 23:34:57 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-09-03 23:34:57 +0000
commit71dbef6d27210259ae263b84120f94fe9d6784e7 (patch)
treeb863ce62374da9be207a72d89ea53e378585b620 /actionpack/lib
parent8ca3f34db18d23ff26ee71f11a2eba3dcfdff22f (diff)
downloadrails-71dbef6d27210259ae263b84120f94fe9d6784e7.tar.gz
rails-71dbef6d27210259ae263b84120f94fe9d6784e7.tar.bz2
rails-71dbef6d27210259ae263b84120f94fe9d6784e7.zip
Integration tests: thoroughly test ActionController::Integration::Session. Closes #6022.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4954 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/integration.rb25
1 files changed, 18 insertions, 7 deletions
diff --git a/actionpack/lib/action_controller/integration.rb b/actionpack/lib/action_controller/integration.rb
index 7676d15c2d..57872e8e8b 100644
--- a/actionpack/lib/action_controller/integration.rb
+++ b/actionpack/lib/action_controller/integration.rb
@@ -151,13 +151,24 @@ module ActionController
process :get, path, parameters, headers
end
- # keep the docs for #get
- %w( post put delete head ).each do |method|
- class_eval <<-EOV, __FILE__, __LINE__
- def #{method}(path, parameters=nil, headers=nil)
- process :#{method}, path, parameters, headers
- end
- EOV
+ # Performs a POST request with the given parameters. See get() for more details.
+ def post(path, parameters=nil, headers=nil)
+ process :post, path, parameters, headers
+ end
+
+ # Performs a PUT request with the given parameters. See get() for more details.
+ def put(path, parameters=nil, headers=nil)
+ process :put, path, parameters, headers
+ end
+
+ # Performs a DELETE request with the given parameters. See get() for more details.
+ def delete(path, parameters=nil, headers=nil)
+ process :delete, path, parameters, headers
+ end
+
+ # Performs a HEAD request with the given parameters. See get() for more details.
+ def head(path, parameters=nil, headers=nil)
+ process :head, path, parameters, headers
end
# Performs an XMLHttpRequest request with the given parameters, mimicing