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

test/unit/repository_darcs_test.rb

index 7cc6cb09cb9378a1e86bc05a4fd42e3b2080208d..65395fe519f4ce54351a02b73eb72e3379d3b8eb 100644 (file)
@@ -20,14 +20,15 @@ require File.expand_path('../../test_helper', __FILE__)
 class RepositoryDarcsTest < ActiveSupport::TestCase
   fixtures :projects
 
-  # No '..' in the repository path
-  REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/darcs_repository'
+  REPOSITORY_PATH = Rails.root.join('tmp/test/darcs_repository').to_s
 
   def setup
     @project = Project.find(3)
     @repository = Repository::Darcs.create(
-                      :project => @project, :url => REPOSITORY_PATH,
-                      :log_encoding => 'UTF-8')
+                      :project      => @project,
+                      :url          => REPOSITORY_PATH,
+                      :log_encoding => 'UTF-8'
+                      )
     assert @repository
   end