##// END OF EJS Templates
Merged r4632 from trunk....
Toshi MARUYAMA -
r4518:6ee4c0bac76e
parent child
Show More
@@ -1,16 +1,16
1 1 require File.expand_path('../../../../../../test_helper', __FILE__)
2 2 begin
3 3 require 'mocha'
4
4
5 5 class MercurialAdapterTest < ActiveSupport::TestCase
6
6
7 7 TEMPLATES_DIR = Redmine::Scm::Adapters::MercurialAdapter::TEMPLATES_DIR
8 8 TEMPLATE_NAME = Redmine::Scm::Adapters::MercurialAdapter::TEMPLATE_NAME
9 9 TEMPLATE_EXTENSION = Redmine::Scm::Adapters::MercurialAdapter::TEMPLATE_EXTENSION
10
10
11 11 REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/mercurial_repository'
12 12
13 if File.directory?(REPOSITORY_PATH)
13 if File.directory?(REPOSITORY_PATH)
14 14 def setup
15 15 @adapter = Redmine::Scm::Adapters::MercurialAdapter.new(REPOSITORY_PATH)
16 16 end
@@ -22,8 +22,8 begin
22 22 "Mercurial Distributed SCM (1.0.1+20080525)\n" => [1,0,1],
23 23 "Mercurial Distributed SCM (1916e629a29d)\n" => nil,
24 24 "Mercurial SCM Distribuito (versione 0.9.5)\n" => [0,9,5],
25 "(1.6)\n(1.7)\n(1.8)" => [1,6],
26 "(1.7.1)\r\n(1.8.1)\r\n(1.9.1)" => [1,7,1]}
25 "(1.6)\n(1.7)\n(1.8)" => [1,6],
26 "(1.7.1)\r\n(1.8.1)\r\n(1.9.1)" => [1,7,1]}
27 27
28 28 to_test.each do |s, v|
29 29 test_hgversion_for(s, v)
@@ -31,12 +31,12 begin
31 31 end
32 32
33 33 def test_template_path
34 to_test = { [0,9,5] => "0.9.5",
35 [1,0] => "1.0",
36 [] => "1.0",
37 [1,0,1] => "1.0",
38 [1,7] => "1.0",
39 [1,7,1] => "1.0"}
34 to_test = { [0,9,5] => "0.9.5",
35 [1,0] => "1.0",
36 [] => "1.0",
37 [1,0,1] => "1.0",
38 [1,7] => "1.0",
39 [1,7,1] => "1.0" }
40 40 to_test.each do |v, template|
41 41 test_template_path_for(v, template)
42 42 end
General Comments 0
You need to be logged in to leave comments. Login now