diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-05-31 04:49:18 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-05-31 04:49:18 +0000 |
commit | bf1b06e90ada759a8322f36374cf3a733ff6d6dd (patch) | |
tree | 4f611c61785868aca550b233748d884a42525136 | |
parent | 4a98cbe2ddfaaf1b81b18d56d9909cef942ae96e (diff) | |
download | rails-bf1b06e90ada759a8322f36374cf3a733ff6d6dd.tar.gz rails-bf1b06e90ada759a8322f36374cf3a733ff6d6dd.tar.bz2 rails-bf1b06e90ada759a8322f36374cf3a733ff6d6dd.zip |
Easy way to set accepting for functional tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4382 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/lib/action_controller/test_process.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb index c13fe82328..4d79880278 100644 --- a/actionpack/lib/action_controller/test_process.rb +++ b/actionpack/lib/action_controller/test_process.rb @@ -78,6 +78,10 @@ module ActionController #:nodoc: @path = uri.split("?").first end + def accept=(mime_types) + @env["HTTP_ACCEPT"] = Array(mime_types).collect { |mime_types| mime_types.to_s }.join(",") + end + def remote_addr=(addr) @env['REMOTE_ADDR'] = addr end |