]> 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 01:54:05 +0000 (01:54 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 16 Jun 2011 01:54:05 +0000 (01:54 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6078 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/test_helper.rb

index e8474de155071cd6e3dd64498063e03553c63f3f..d9882e7cc17606bc09590f7990df6c0b742b71ec 100644 (file)
@@ -78,9 +78,8 @@ 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"
+    Rails.root.join('tmp/test/attachments').mkdir_p
+    Attachment.storage_path = "#{Rails.root}/tmp/test/attachments"
   end
   
   def with_settings(options, &block)