summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-06-10 11:10:23 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-06-10 11:10:23 +0000
commit7e38ccab55f5b7ae150833f5e4a39eecbb37839e (patch)
tree2f33ca3410a352cd1b3593be1c102cce86807641 /test
parent3baabca8f2cd105922eccfdcfcc5358f4c360867 (diff)
downloadredmine-7e38ccab55f5b7ae150833f5e4a39eecbb37839e.tar.gz
redmine-7e38ccab55f5b7ae150833f5e4a39eecbb37839e.zip
scm: mercurial: replace RAILS_ROOT to Rails.root in unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6051 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/repository_mercurial_test.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb
index 6b79f7655..3911a9031 100644
--- a/test/unit/repository_mercurial_test.rb
+++ b/test/unit/repository_mercurial_test.rb
@@ -20,13 +20,10 @@ require File.expand_path('../../test_helper', __FILE__)
class RepositoryMercurialTest < ActiveSupport::TestCase
fixtures :projects
- # No '..' in the repository path
- 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)
-
def setup
klass = Repository::Mercurial
assert_equal "Mercurial", klass.scm_name
@@ -34,7 +31,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
assert_not_equal "", klass.scm_command
assert_equal true, klass.scm_available
- @project = Project.find(3)
+ @project = Project.find(3)
@repository = Repository::Mercurial.create(
:project => @project,
:url => REPOSITORY_PATH,