From fda7bcdfb6e6200b14f91baba9e3c3143635a50c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 18 Jun 2008 17:02:39 +0000 Subject: [PATCH] Mercurial adapter tests fix (#1469). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1563 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/mercurial_adapter.rb | 2 -- test/unit/mercurial_adapter_test.rb | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index 28b842c27..a00ff4c49 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -192,8 +192,6 @@ module Redmine end end - private - def hgversion_from_command_line @hgversion ||= %x{#{HG_BIN} --version}.match(/\(version (.*)\)/)[1] end diff --git a/test/unit/mercurial_adapter_test.rb b/test/unit/mercurial_adapter_test.rb index b4aaaec61..7c1ef85fd 100644 --- a/test/unit/mercurial_adapter_test.rb +++ b/test/unit/mercurial_adapter_test.rb @@ -4,9 +4,9 @@ begin class MercurialAdapterTest < Test::Unit::TestCase - TEMPLATES_DIR = "#{RAILS_ROOT}/extra/mercurial" - TEMPLATE_NAME = "hg-template" - TEMPLATE_EXTENSION = "tmpl" + TEMPLATES_DIR = Redmine::Scm::Adapters::MercurialAdapter::TEMPLATES_DIR + TEMPLATE_NAME = Redmine::Scm::Adapters::MercurialAdapter::TEMPLATE_NAME + TEMPLATE_EXTENSION = Redmine::Scm::Adapters::MercurialAdapter::TEMPLATE_EXTENSION REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/mercurial_repository'