@@ -22,17 +22,17 class RepositoryMercurialTest < ActiveSupport::TestCase | |||||
22 |
|
22 | |||
23 | # No '..' in the repository path |
|
23 | # No '..' in the repository path | |
24 | REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/mercurial_repository' |
|
24 | REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/mercurial_repository' | |
25 |
|
25 | |||
26 | def setup |
|
26 | def setup | |
27 | @project = Project.find(1) |
|
27 | @project = Project.find(1) | |
28 |
|
|
28 | @repository = Repository::Mercurial.create(:project => @project, :url => REPOSITORY_PATH) | |
|
29 | assert @repository | |||
29 | end |
|
30 | end | |
30 |
|
31 | |||
31 | if File.directory?(REPOSITORY_PATH) |
|
32 | if File.directory?(REPOSITORY_PATH) | |
32 | def test_fetch_changesets_from_scratch |
|
33 | def test_fetch_changesets_from_scratch | |
33 | @repository.fetch_changesets |
|
34 | @repository.fetch_changesets | |
34 | @repository.reload |
|
35 | @repository.reload | |
35 |
|
||||
36 | assert_equal 17, @repository.changesets.count |
|
36 | assert_equal 17, @repository.changesets.count | |
37 | assert_equal 25, @repository.changes.count |
|
37 | assert_equal 25, @repository.changes.count | |
38 | assert_equal "Initial import.\nThe repository contains 3 files.", |
|
38 | assert_equal "Initial import.\nThe repository contains 3 files.", |
General Comments 0
You need to be logged in to leave comments.
Login now