diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-01-01 22:01:28 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-01-01 22:01:28 +0000 |
commit | 35c35a193cd705134cf20fdf1950a8155c33d0f8 (patch) | |
tree | d92f6001e55d73845a88a8b43f356195a0ff4b2a /test/unit/repository_darcs_test.rb | |
parent | 1294fe2c9636d4b0bbe41f7f7829dd9a1fb0396f (diff) | |
download | redmine-35c35a193cd705134cf20fdf1950a8155c33d0f8.tar.gz redmine-35c35a193cd705134cf20fdf1950a8155c33d0f8.zip |
repository: switch darcs cat test if cat supports.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4608 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_darcs_test.rb')
-rw-r--r-- | test/unit/repository_darcs_test.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/unit/repository_darcs_test.rb b/test/unit/repository_darcs_test.rb index c612a716e..d470bebfa 100644 --- a/test/unit/repository_darcs_test.rb +++ b/test/unit/repository_darcs_test.rb @@ -54,12 +54,14 @@ class RepositoryDarcsTest < ActiveSupport::TestCase assert entries.detect {|e| e.name == 'watchers_controller.rb'} assert_nil entries.detect {|e| e.name == 'welcome_controller.rb'} end - + def test_cat - @repository.fetch_changesets - cat = @repository.cat("sources/welcome_controller.rb", 2) - assert_not_nil cat - assert cat.include?('class WelcomeController < ApplicationController') + if @repository.scm.supports_cat? + @repository.fetch_changesets + cat = @repository.cat("sources/welcome_controller.rb", 2) + assert_not_nil cat + assert cat.include?('class WelcomeController < ApplicationController') + end end else puts "Darcs test repository NOT FOUND. Skipping unit tests !!!" |