##// END OF EJS Templates
scm: mercurial: split unit model test setup whether repository required or not...
Toshi MARUYAMA -
r8842:d004d83183be
parent child
Show More
@@ -24,14 +24,7 class RepositoryMercurialTest < ActiveSupport::TestCase
24 NUM_REV = 32
24 NUM_REV = 32
25 CHAR_1_HEX = "\xc3\x9c"
25 CHAR_1_HEX = "\xc3\x9c"
26
26
27 if File.directory?(REPOSITORY_PATH)
28 def setup
27 def setup
29 klass = Repository::Mercurial
30 assert_equal "Mercurial", klass.scm_name
31 assert klass.scm_adapter_class
32 assert_not_equal "", klass.scm_command
33 assert_equal true, klass.scm_available
34
35 @project = Project.find(3)
28 @project = Project.find(3)
36 @repository = Repository::Mercurial.create(
29 @repository = Repository::Mercurial.create(
37 :project => @project,
30 :project => @project,
@@ -51,6 +44,15 class RepositoryMercurialTest < ActiveSupport::TestCase
51 end
44 end
52 end
45 end
53
46
47 if File.directory?(REPOSITORY_PATH)
48 def test_scm_available
49 klass = Repository::Mercurial
50 assert_equal "Mercurial", klass.scm_name
51 assert klass.scm_adapter_class
52 assert_not_equal "", klass.scm_command
53 assert_equal true, klass.scm_available
54 end
55
54 def test_fetch_changesets_from_scratch
56 def test_fetch_changesets_from_scratch
55 assert_equal 0, @repository.changesets.count
57 assert_equal 0, @repository.changesets.count
56 @repository.fetch_changesets
58 @repository.fetch_changesets
General Comments 0
You need to be logged in to leave comments. Login now