diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-02-24 11:18:37 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-02-24 11:18:37 +0000 |
commit | 4a7de0cd63a12f0d99ed9bcbd2c52c46e578d0b7 (patch) | |
tree | bece46ca0186995cbed72de3f6253473f9b09135 /test/unit/repository_git_test.rb | |
parent | 9f581b9eebe2bf9680aa3143226612cdad63419f (diff) | |
download | redmine-4a7de0cd63a12f0d99ed9bcbd2c52c46e578d0b7.tar.gz redmine-4a7de0cd63a12f0d99ed9bcbd2c52c46e578d0b7.zip |
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
Diffstat (limited to 'test/unit/repository_git_test.rb')
-rw-r--r-- | test/unit/repository_git_test.rb | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb index 4730465b8..f1ba70fbf 100644 --- a/test/unit/repository_git_test.rb +++ b/test/unit/repository_git_test.rb @@ -43,25 +43,27 @@ class RepositoryGitTest < ActiveSupport::TestCase JRUBY_SKIP = (RUBY_PLATFORM == 'java') JRUBY_SKIP_STR = "TODO: This test fails in JRuby" + def setup + @project = Project.find(3) + @repository = Repository::Git.create( + :project => @project, + :url => REPOSITORY_PATH, + :path_encoding => 'ISO-8859-1' + ) + assert @repository + @char_1 = CHAR_1_HEX.dup + if @char_1.respond_to?(:force_encoding) + @char_1.force_encoding('UTF-8') + end + end + if File.directory?(REPOSITORY_PATH) - def setup + 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 - - @project = Project.find(3) - @repository = Repository::Git.create( - :project => @project, - :url => REPOSITORY_PATH, - :path_encoding => 'ISO-8859-1' - ) - assert @repository - @char_1 = CHAR_1_HEX.dup - if @char_1.respond_to?(:force_encoding) - @char_1.force_encoding('UTF-8') - end end def test_fetch_changesets_from_scratch |