scm: darcs: replace RAILS_ROOT to Rails.root in unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6048 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
5ffc855438
commit
ea9847bb37
|
@ -20,14 +20,15 @@ require File.expand_path('../../test_helper', __FILE__)
|
||||||
class RepositoryDarcsTest < ActiveSupport::TestCase
|
class RepositoryDarcsTest < ActiveSupport::TestCase
|
||||||
fixtures :projects
|
fixtures :projects
|
||||||
|
|
||||||
# No '..' in the repository path
|
REPOSITORY_PATH = Rails.root.join('tmp/test/darcs_repository').to_s
|
||||||
REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/darcs_repository'
|
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
@project = Project.find(3)
|
@project = Project.find(3)
|
||||||
@repository = Repository::Darcs.create(
|
@repository = Repository::Darcs.create(
|
||||||
:project => @project, :url => REPOSITORY_PATH,
|
:project => @project,
|
||||||
:log_encoding => 'UTF-8')
|
:url => REPOSITORY_PATH,
|
||||||
|
:log_encoding => 'UTF-8'
|
||||||
|
)
|
||||||
assert @repository
|
assert @repository
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue