diff test/unit/.svn/text-base/repository_darcs_test.rb.svn-base @ 119:8661b858af72

* Update to Redmine trunk rev 4705
author Chris Cannam
date Thu, 13 Jan 2011 14:12:06 +0000
parents 513646585e45
children 051f544170fe
line wrap: on
line diff
--- a/test/unit/.svn/text-base/repository_darcs_test.rb.svn-base	Fri Nov 19 14:05:24 2010 +0000
+++ b/test/unit/.svn/text-base/repository_darcs_test.rb.svn-base	Thu Jan 13 14:12:06 2011 +0000
@@ -15,7 +15,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-require File.dirname(__FILE__) + '/../test_helper'
+require File.expand_path('../../test_helper', __FILE__)
 
 class RepositoryDarcsTest < ActiveSupport::TestCase
   fixtures :projects
@@ -54,12 +54,14 @@
       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 !!!"