-# redMine - project management software
-# Copyright (C) 2006-2008 Jean-Philippe Lang
+# Redmine - project management software
+# Copyright (C) 2006-2011 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@project = Project.find(PRJ_ID)
@repository = Repository::Subversion.create(:project => @project,
- :url => "file://#{self.class.repository_path('subversion')}")
+ :url => self.class.subversion_repository_url)
assert @repository
end
-# redMine - project management software
-# Copyright (C) 2006 Jean-Philippe Lang
+# Redmine - project management software
+# Copyright (C) 2006-2011 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
File.join(RAILS_ROOT.gsub(%r{config\/\.\.}, ''), "/tmp/test/#{vendor.downcase}_repository")
end
+ # Returns the url of the subbversion test repository
+ def self.subversion_repository_url
+ path = repository_path('subversion')
+ path = '/' + path unless path.starts_with?('/')
+ "file://#{path}"
+ end
+
# Returns true if the +vendor+ test repository is configured
def self.repository_configured?(vendor)
File.directory?(repository_path(vendor))
-# redMine - project management software
-# Copyright (C) 2006-2008 Jean-Philippe Lang
+# Redmine - project management software
+# Copyright (C) 2006-2011 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
if repository_configured?('subversion')
def setup
- repo_path = "file://#{self.class.repository_path('subversion')}"
- @adapter = Redmine::Scm::Adapters::SubversionAdapter.new(repo_path)
+ @adapter = Redmine::Scm::Adapters::SubversionAdapter.new(self.class.subversion_repository_url)
end
def test_client_version
-# redMine - project management software
-# Copyright (C) 2006-2007 Jean-Philippe Lang
+# Redmine - project management software
+# Copyright (C) 2006-2011 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
def setup
@project = Project.find(3)
@repository = Repository::Subversion.create(:project => @project,
- :url => "file://#{self.class.repository_path('subversion')}")
+ :url => self.class.subversion_repository_url)
assert @repository
end