]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: replace RAILS_ROOT to Rails.root in unit adapter test.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 10 Jun 2011 11:09:50 +0000 (11:09 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 10 Jun 2011 11:09:50 +0000 (11:09 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6050 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb

index 99315dfd1985e15aa670912d9608daaecabfd899..420097555beef7537b69cffcb42f3dc1a1c8311d 100644 (file)
@@ -3,14 +3,11 @@ begin
   require 'mocha'
 
   class MercurialAdapterTest < ActiveSupport::TestCase
-
     HELPERS_DIR        = Redmine::Scm::Adapters::MercurialAdapter::HELPERS_DIR
     TEMPLATE_NAME      = Redmine::Scm::Adapters::MercurialAdapter::TEMPLATE_NAME
     TEMPLATE_EXTENSION = Redmine::Scm::Adapters::MercurialAdapter::TEMPLATE_EXTENSION
 
-    REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') +
-                         '/tmp/test/mercurial_repository'
-
+    REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s
     CHAR_1_HEX = "\xc3\x9c"
 
     if File.directory?(REPOSITORY_PATH)