diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/controller/send_file_test.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb index aee139b95e..2c833aa2e5 100644 --- a/actionpack/test/controller/send_file_test.rb +++ b/actionpack/test/controller/send_file_test.rb @@ -32,14 +32,18 @@ end class SendFileTest < ActionController::TestCase 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 |