]> source.dussan.org Git - redmine.git/commitdiff
replace RAILS_ROOT to Rails.root at test/test_helper.rb.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 20 Jun 2011 12:33:58 +0000 (12:33 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 20 Jun 2011 12:33:58 +0000 (12:33 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6103 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/test_helper.rb

index 51eaae13e3cee9418d8c9d5e610e225e712d2f3a..1bb45bc97fca8e4472c0b0ce3e4acc55ab7c5a49 100644 (file)
@@ -106,24 +106,24 @@ class ActiveSupport::TestCase
     # LDAP is not listening
     return nil
   end
-  
+
   # Returns the path to the test +vendor+ repository
   def self.repository_path(vendor)
-    File.join(RAILS_ROOT.gsub(%r{config\/\.\.}, ''), "/tmp/test/#{vendor.downcase}_repository")
+    Rails.root.join("tmp/test/#{vendor.downcase}_repository").to_s
   end
-  
+
   # Returns the url of the subversion test repository
   def self.subversion_repository_url
     path = repository_path('subversion')
     path = '/' + path unless path.starts_with?('/')
     "file://#{path}"
   end
-  
+
   # Returns true if the +vendor+ test repository is configured
   def self.repository_configured?(vendor)
     File.directory?(repository_path(vendor))
   end
-  
+
   def assert_error_tag(options={})
     assert_tag({:attributes => { :id => 'errorExplanation' }}.merge(options))
   end