scm: mercurial: split unit model test setup whether repository required or not
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8962 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
4a7de0cd63
commit
d004d83183
|
@ -24,14 +24,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
|
|||
NUM_REV = 32
|
||||
CHAR_1_HEX = "\xc3\x9c"
|
||||
|
||||
if File.directory?(REPOSITORY_PATH)
|
||||
def setup
|
||||
klass = Repository::Mercurial
|
||||
assert_equal "Mercurial", klass.scm_name
|
||||
assert klass.scm_adapter_class
|
||||
assert_not_equal "", klass.scm_command
|
||||
assert_equal true, klass.scm_available
|
||||
|
||||
@project = Project.find(3)
|
||||
@repository = Repository::Mercurial.create(
|
||||
:project => @project,
|
||||
|
@ -51,6 +44,15 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
if File.directory?(REPOSITORY_PATH)
|
||||
def test_scm_available
|
||||
klass = Repository::Mercurial
|
||||
assert_equal "Mercurial", klass.scm_name
|
||||
assert klass.scm_adapter_class
|
||||
assert_not_equal "", klass.scm_command
|
||||
assert_equal true, klass.scm_available
|
||||
end
|
||||
|
||||
def test_fetch_changesets_from_scratch
|
||||
assert_equal 0, @repository.changesets.count
|
||||
@repository.fetch_changesets
|
||||
|
|
Loading…
Reference in New Issue