diff options
Diffstat (limited to 'actionpack/test/controller/send_file_test.rb')
-rw-r--r-- | actionpack/test/controller/send_file_test.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb index 4df2f8b98d..2c833aa2e5 100644 --- a/actionpack/test/controller/send_file_test.rb +++ b/actionpack/test/controller/send_file_test.rb @@ -30,17 +30,20 @@ class SendFileWithActionControllerLive < SendFileController end class SendFileTest < ActionController::TestCase - tests SendFileController include TestFileUtils - Mime::Type.register "image/png", :png unless defined? Mime::PNG - def setup + @mime_type_defined = defined? Mime::PNG + Mime::Type.register "image/png", :png unless @mime_type_defined @controller = SendFileController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new end + teardown do + Mime::Type.unregister :png unless @mime_type_defined + end + def test_file_nostream @controller.options = { :stream => false } response = nil @@ -201,8 +204,6 @@ class SendFileTest < ActionController::TestCase end end - tests SendFileWithActionControllerLive - def test_send_file_with_action_controller_live @controller = SendFileWithActionControllerLive.new @controller.options = { :content_type => "application/x-ruby" } |