@@ -78,9 +78,11 class ActiveSupport::TestCase | |||
|
78 | 78 | |
|
79 | 79 | # Use a temporary directory for attachment related tests |
|
80 | 80 | def set_tmp_attachments_directory |
|
81 |
Dir.mkdir "#{R |
|
|
82 |
|
|
|
83 | Attachment.storage_path = "#{RAILS_ROOT}/tmp/test/attachments" | |
|
81 | Dir.mkdir "#{Rails.root}/tmp/test" unless File.directory?("#{Rails.root}/tmp/test") | |
|
82 | unless File.directory?("#{Rails.root}/tmp/test/attachments") | |
|
83 | Dir.mkdir "#{Rails.root}/tmp/test/attachments" | |
|
84 | end | |
|
85 | Attachment.storage_path = "#{Rails.root}/tmp/test/attachments" | |
|
84 | 86 | end |
|
85 | 87 | |
|
86 | 88 | def with_settings(options, &block) |
General Comments 0
You need to be logged in to leave comments.
Login now