diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-27 11:17:53 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-27 11:17:53 +0000 |
commit | 41c82e66c1abb2abbf5081c1e18b6070a6bbbd01 (patch) | |
tree | 2040ea543636046ed55d3e0769b6d02f086b0810 /actionpack/test | |
parent | 699cc15116ab88c9ae6bea0e5d0020b8cf16680e (diff) | |
download | rails-41c82e66c1abb2abbf5081c1e18b6070a6bbbd01.tar.gz rails-41c82e66c1abb2abbf5081c1e18b6070a6bbbd01.tar.bz2 rails-41c82e66c1abb2abbf5081c1e18b6070a6bbbd01.zip |
Ruby 1.9 compat: file uploads. References #1689 [Frederick Cheung]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8492 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/dispatcher_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/request_test.rb | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/test/controller/dispatcher_test.rb b/actionpack/test/controller/dispatcher_test.rb index ec937ebfd2..cdaf2bdae5 100644 --- a/actionpack/test/controller/dispatcher_test.rb +++ b/actionpack/test/controller/dispatcher_test.rb @@ -16,7 +16,7 @@ class DispatcherTest < Test::Unit::TestCase end def teardown - ENV['REQUEST_METHOD'] = nil + ENV.delete 'REQUEST_METHOD' end def test_clears_dependencies_after_dispatch_if_in_loading_mode diff --git a/actionpack/test/controller/request_test.rb b/actionpack/test/controller/request_test.rb index a81fa4d866..67eb58a75a 100644 --- a/actionpack/test/controller/request_test.rb +++ b/actionpack/test/controller/request_test.rb @@ -731,7 +731,11 @@ class MultipartRequestParameterParsingTest < Test::Unit::TestCase assert_equal 'bar', params['foo'] file = params['file'] - assert_kind_of Tempfile, file + if RUBY_VERSION > '1.9' + assert_kind_of File, file + else + assert_kind_of Tempfile, file + end assert_equal 'file.txt', file.original_filename assert_equal "text/plain", file.content_type assert ('a' * 20480) == file.read |