]> source.dussan.org Git - redmine.git/commitdiff
replace RAILS_ROOT to Rails.root in test/test_helper.rb.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 16 Jun 2011 04:02:31 +0000 (04:02 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 16 Jun 2011 04:02:31 +0000 (04:02 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6081 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/test_helper.rb

index e8474de155071cd6e3dd64498063e03553c63f3f..51eaae13e3cee9418d8c9d5e610e225e712d2f3a 100644 (file)
@@ -78,11 +78,13 @@ 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")
-    Dir.mkdir "#{RAILS_ROOT}/tmp/test/attachments" unless File.directory?("#{RAILS_ROOT}/tmp/test/attachments")
-    Attachment.storage_path = "#{RAILS_ROOT}/tmp/test/attachments"
+    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"
   end
-  
+
   def with_settings(options, &block)
     saved_settings = options.keys.inject({}) {|h, k| h[k] = Setting[k].dup; h}
     options.each {|k, v| Setting[k] = v}