scm: git: split unit model test setup whether repository required or not
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8961 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
9f581b9eeb
commit
4a7de0cd63
|
@ -43,14 +43,7 @@ class RepositoryGitTest < ActiveSupport::TestCase
|
|||
JRUBY_SKIP = (RUBY_PLATFORM == 'java')
|
||||
JRUBY_SKIP_STR = "TODO: This test fails in JRuby"
|
||||
|
||||
if File.directory?(REPOSITORY_PATH)
|
||||
def setup
|
||||
klass = Repository::Git
|
||||
assert_equal "Git", 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::Git.create(
|
||||
:project => @project,
|
||||
|
@ -64,6 +57,15 @@ class RepositoryGitTest < ActiveSupport::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
if File.directory?(REPOSITORY_PATH)
|
||||
def test_scm_available
|
||||
klass = Repository::Git
|
||||
assert_equal "Git", 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_nil @repository.extra_info
|
||||
|
||||
|
|
Loading…
Reference in New Issue