aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-02-20 23:49:43 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-02-20 23:49:43 +0000
commite875b0db4714a86798a8248e91bea3fb7ffefe52 (patch)
tree4fea2736377ed0ed93cfe54800c32057552cd85c /actionpack/test
parent377bdd02b9daba35113299262a98060763925959 (diff)
downloadrails-e875b0db4714a86798a8248e91bea3fb7ffefe52.tar.gz
rails-e875b0db4714a86798a8248e91bea3fb7ffefe52.tar.bz2
rails-e875b0db4714a86798a8248e91bea3fb7ffefe52.zip
Fixed that the request method would be sticky in tests (closes #3849) [lars@pinds.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3622 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/test_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb
index 04baff6ed6..dcb16841ae 100644
--- a/actionpack/test/controller/test_test.rb
+++ b/actionpack/test/controller/test_test.rb
@@ -327,6 +327,12 @@ HTML
assert_nil @request.env['HTTP_X_REQUESTED_WITH']
end
+ def test_header_properly_reset_after_get_request
+ get :test_params
+ @request.recycle!
+ assert_nil @request.instance_variable_get("@request_method")
+ end
+
%w(controller response request).each do |variable|
%w(get post put delete head process).each do |method|
define_method("test_#{variable}_missing_for_#{method}_raises_error") do