@@ -20,13 +20,10 require File.expand_path('../../test_helper', __FILE__) | |||||
20 | class RepositoryMercurialTest < ActiveSupport::TestCase |
|
20 | class RepositoryMercurialTest < ActiveSupport::TestCase | |
21 | fixtures :projects |
|
21 | fixtures :projects | |
22 |
|
22 | |||
23 | # No '..' in the repository path |
|
23 | REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s | |
24 | REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/mercurial_repository' |
|
|||
25 |
|
||||
26 | CHAR_1_HEX = "\xc3\x9c" |
|
24 | CHAR_1_HEX = "\xc3\x9c" | |
27 |
|
25 | |||
28 | if File.directory?(REPOSITORY_PATH) |
|
26 | if File.directory?(REPOSITORY_PATH) | |
29 |
|
||||
30 | def setup |
|
27 | def setup | |
31 | klass = Repository::Mercurial |
|
28 | klass = Repository::Mercurial | |
32 | assert_equal "Mercurial", klass.scm_name |
|
29 | assert_equal "Mercurial", klass.scm_name | |
@@ -34,7 +31,7 class RepositoryMercurialTest < ActiveSupport::TestCase | |||||
34 | assert_not_equal "", klass.scm_command |
|
31 | assert_not_equal "", klass.scm_command | |
35 | assert_equal true, klass.scm_available |
|
32 | assert_equal true, klass.scm_available | |
36 |
|
33 | |||
37 | @project = Project.find(3) |
|
34 | @project = Project.find(3) | |
38 | @repository = Repository::Mercurial.create( |
|
35 | @repository = Repository::Mercurial.create( | |
39 | :project => @project, |
|
36 | :project => @project, | |
40 | :url => REPOSITORY_PATH, |
|
37 | :url => REPOSITORY_PATH, |
General Comments 0
You need to be logged in to leave comments.
Login now