summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/unit/repository_darcs_test.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/unit/repository_darcs_test.rb b/test/unit/repository_darcs_test.rb
index 7cc6cb09c..65395fe51 100644
--- a/test/unit/repository_darcs_test.rb
+++ b/test/unit/repository_darcs_test.rb
@@ -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