Mercurial > hg > soundsoftware-site
comparison test/unit/.svn/text-base/repository_darcs_test.rb.svn-base @ 117:af80e5618e9b redmine-1.1
* Update to Redmine 1.1-stable branch (Redmine SVN rev 4707)
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 12:53:21 +0000 |
parents | 513646585e45 |
children | 051f544170fe |
comparison
equal
deleted
inserted
replaced
39:150ceac17a8d | 117:af80e5618e9b |
---|---|
13 # | 13 # |
14 # You should have received a copy of the GNU General Public License | 14 # You should have received a copy of the GNU General Public License |
15 # along with this program; if not, write to the Free Software | 15 # along with this program; if not, write to the Free Software |
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | 17 |
18 require File.dirname(__FILE__) + '/../test_helper' | 18 require File.expand_path('../../test_helper', __FILE__) |
19 | 19 |
20 class RepositoryDarcsTest < ActiveSupport::TestCase | 20 class RepositoryDarcsTest < ActiveSupport::TestCase |
21 fixtures :projects | 21 fixtures :projects |
22 | 22 |
23 # No '..' in the repository path | 23 # No '..' in the repository path |
52 def test_deleted_files_should_not_be_listed | 52 def test_deleted_files_should_not_be_listed |
53 entries = @repository.entries('sources') | 53 entries = @repository.entries('sources') |
54 assert entries.detect {|e| e.name == 'watchers_controller.rb'} | 54 assert entries.detect {|e| e.name == 'watchers_controller.rb'} |
55 assert_nil entries.detect {|e| e.name == 'welcome_controller.rb'} | 55 assert_nil entries.detect {|e| e.name == 'welcome_controller.rb'} |
56 end | 56 end |
57 | 57 |
58 def test_cat | 58 def test_cat |
59 @repository.fetch_changesets | 59 if @repository.scm.supports_cat? |
60 cat = @repository.cat("sources/welcome_controller.rb", 2) | 60 @repository.fetch_changesets |
61 assert_not_nil cat | 61 cat = @repository.cat("sources/welcome_controller.rb", 2) |
62 assert cat.include?('class WelcomeController < ApplicationController') | 62 assert_not_nil cat |
63 assert cat.include?('class WelcomeController < ApplicationController') | |
64 end | |
63 end | 65 end |
64 else | 66 else |
65 puts "Darcs test repository NOT FOUND. Skipping unit tests !!!" | 67 puts "Darcs test repository NOT FOUND. Skipping unit tests !!!" |
66 def test_fake; assert true end | 68 def test_fake; assert true end |
67 end | 69 end |