From 80a7486f95a39ad3fc0946fad17fe51cff01cec6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 9 Jun 2008 18:40:59 +0000 Subject: File viewer for attached text files. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1520 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/test_helper.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/test_helper.rb') diff --git a/test/test_helper.rb b/test/test_helper.rb index 61670318a..150b063e8 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -57,6 +57,12 @@ class Test::Unit::TestCase def test_uploaded_file(name, mime) ActionController::TestUploadedFile.new(Test::Unit::TestCase.fixture_path + "/files/#{name}", mime) end + + # Use a temporary directory for attachment related tests + def set_tmp_attachments_directory + Dir.mkdir "#{RAILS_ROOT}/tmp/test/attachments" unless File.directory?("#{RAILS_ROOT}/tmp/test/attachments") + Attachment.storage_path = "#{RAILS_ROOT}/tmp/test/attachments" + end end -- cgit v1.2.3