mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-11 13:15:20 +00:00
Create tmp directory on test launch.
git-svn-id: http://svn.redmine.org/redmine/trunk@16587 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
966f238da4
commit
f414e3c863
@ -34,9 +34,13 @@ include ObjectHelpers
|
||||
|
||||
require 'net/ldap'
|
||||
require 'mocha/setup'
|
||||
require 'fileutils'
|
||||
|
||||
Redmine::SudoMode.disable!
|
||||
|
||||
$redmine_tmp_attachments_directory = "#{Rails.root}/tmp/test/attachments"
|
||||
FileUtils.mkdir_p $redmine_tmp_attachments_directory
|
||||
|
||||
class ActionView::TestCase
|
||||
helper :application
|
||||
include ApplicationHelper
|
||||
@ -68,11 +72,7 @@ class ActiveSupport::TestCase
|
||||
|
||||
# Use a temporary directory for attachment related tests
|
||||
def set_tmp_attachments_directory
|
||||
Dir.mkdir "#{Rails.root}/tmp/test" unless File.directory?("#{Rails.root}/tmp/test")
|
||||
unless File.directory?("#{Rails.root}/tmp/test/attachments")
|
||||
Dir.mkdir "#{Rails.root}/tmp/test/attachments"
|
||||
end
|
||||
Attachment.storage_path = "#{Rails.root}/tmp/test/attachments"
|
||||
Attachment.storage_path = $redmine_tmp_attachments_directory
|
||||
end
|
||||
|
||||
def set_fixtures_attachments_directory
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user