From 3df729e47d609bca3355150319c451645e3843b7 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Tue, 27 Dec 2011 18:23:05 -0800 Subject: [PATCH] Replace puts and !!! messages with pending tests when the test SCMs are missing --- test/functional/repositories_bazaar_controller_test.rb | 3 +-- test/functional/repositories_cvs_controller_test.rb | 3 +-- test/functional/repositories_darcs_controller_test.rb | 3 +-- test/functional/repositories_filesystem_controller_test.rb | 3 +-- test/functional/repositories_git_controller_test.rb | 3 +-- test/functional/repositories_mercurial_controller_test.rb | 3 +-- test/functional/repositories_subversion_controller_test.rb | 4 ++-- test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb | 2 +- test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb | 2 +- test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb | 2 +- test/unit/lib/redmine/scm/adapters/filesystem_adapter_test.rb | 2 +- test/unit/lib/redmine/scm/adapters/git_adapter_test.rb | 2 +- test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb | 2 +- test/unit/lib/redmine/scm/adapters/subversion_adapter_test.rb | 2 +- test/unit/repository_bazaar_test.rb | 2 +- test/unit/repository_cvs_test.rb | 2 +- test/unit/repository_darcs_test.rb | 2 +- test/unit/repository_filesystem_test.rb | 2 +- test/unit/repository_git_test.rb | 2 +- test/unit/repository_mercurial_test.rb | 2 +- test/unit/repository_subversion_test.rb | 2 +- 21 files changed, 22 insertions(+), 28 deletions(-) diff --git a/test/functional/repositories_bazaar_controller_test.rb b/test/functional/repositories_bazaar_controller_test.rb index eceb0572..5edd8441 100644 --- a/test/functional/repositories_bazaar_controller_test.rb +++ b/test/functional/repositories_bazaar_controller_test.rb @@ -131,7 +131,6 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase :sibling => { :tag => 'td', :content => /Main purpose/ } end else - puts "Bazaar test repository NOT FOUND. Skipping functional tests !!!" - def test_fake; assert true end + should "Bazaar test repository not found." end end diff --git a/test/functional/repositories_cvs_controller_test.rb b/test/functional/repositories_cvs_controller_test.rb index 708de0dc..0ad19ed5 100644 --- a/test/functional/repositories_cvs_controller_test.rb +++ b/test/functional/repositories_cvs_controller_test.rb @@ -189,7 +189,6 @@ class RepositoriesCvsControllerTest < ActionController::TestCase } end else - puts "CVS test repository NOT FOUND. Skipping functional tests !!!" - def test_fake; assert true end + should "CVS test repository not found." end end diff --git a/test/functional/repositories_darcs_controller_test.rb b/test/functional/repositories_darcs_controller_test.rb index 2c95cd48..ef73675e 100644 --- a/test/functional/repositories_darcs_controller_test.rb +++ b/test/functional/repositories_darcs_controller_test.rb @@ -98,7 +98,6 @@ class RepositoriesDarcsControllerTest < ActionController::TestCase :content => /def remove/ } end else - puts "Darcs test repository NOT FOUND. Skipping functional tests !!!" - def test_fake; assert true end + should "Darcs test repository not found." end end diff --git a/test/functional/repositories_filesystem_controller_test.rb b/test/functional/repositories_filesystem_controller_test.rb index 4595a5f1..1cf71d8b 100644 --- a/test/functional/repositories_filesystem_controller_test.rb +++ b/test/functional/repositories_filesystem_controller_test.rb @@ -102,7 +102,6 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase end end else - puts "Filesystem test repository NOT FOUND. Skipping functional tests !!!" - def test_fake; assert true end + should "Filesystem test repository not found." end end diff --git a/test/functional/repositories_git_controller_test.rb b/test/functional/repositories_git_controller_test.rb index d52f7d1a..4a283f83 100644 --- a/test/functional/repositories_git_controller_test.rb +++ b/test/functional/repositories_git_controller_test.rb @@ -231,7 +231,6 @@ class RepositoriesGitControllerTest < ActionController::TestCase end end else - puts "Git test repository NOT FOUND. Skipping functional tests !!!" - def test_fake; assert true end + should "Git test repository not found." end end diff --git a/test/functional/repositories_mercurial_controller_test.rb b/test/functional/repositories_mercurial_controller_test.rb index 0815ce54..ba5199fe 100644 --- a/test/functional/repositories_mercurial_controller_test.rb +++ b/test/functional/repositories_mercurial_controller_test.rb @@ -362,7 +362,6 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase end end else - puts "Mercurial test repository NOT FOUND. Skipping functional tests !!!" - def test_fake; assert true end + should "Mercurial test repository not found." end end diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb index f209e3cd..ca636c0d 100644 --- a/test/functional/repositories_subversion_controller_test.rb +++ b/test/functional/repositories_subversion_controller_test.rb @@ -285,7 +285,7 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase assert_tag :tag => 'h2', :content => /@ 8/ end else - puts "Subversion test repository NOT FOUND. Skipping functional tests !!!" - def test_fake; assert true end + should "Subversion test repository not found." + end end diff --git a/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb index 06d6a52f..9b681b54 100644 --- a/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb @@ -55,7 +55,7 @@ begin assert_equal version, @adapter.class.scm_command_version end else - puts "Bazaar test repository NOT FOUND. Skipping unit tests !!!" + should "Bazaar test repository NOT FOUND." def test_fake; assert true end end end diff --git a/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb index 8e7c60bc..fde4f82f 100644 --- a/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb @@ -68,7 +68,7 @@ begin assert_equal version, @adapter.class.scm_command_version end else - puts "Cvs test repository NOT FOUND. Skipping unit tests !!!" + should "CVS test repository not found." def test_fake; assert true end end end diff --git a/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb index 87e0c09c..1d7229a4 100644 --- a/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb @@ -54,7 +54,7 @@ begin end else - puts "Darcs test repository NOT FOUND. Skipping unit tests !!!" + should "Darcs test repository not found." def test_fake; assert true end end end diff --git a/test/unit/lib/redmine/scm/adapters/filesystem_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/filesystem_adapter_test.rb index 4ebfccd4..f14899bc 100644 --- a/test/unit/lib/redmine/scm/adapters/filesystem_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/filesystem_adapter_test.rb @@ -46,7 +46,7 @@ class FilesystemAdapterTest < ActiveSupport::TestCase assert_equal "TEST CAT\n", @adapter.cat("/test", 1) end else - puts "Filesystem test repository NOT FOUND. Skipping unit tests !!! See doc/RUNNING_TESTS." + should "Filesystem test repository not found." def test_fake; assert true end end end diff --git a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb index 88655074..891dc337 100644 --- a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb @@ -239,7 +239,7 @@ begin end else - puts "Git test repository NOT FOUND. Skipping unit tests !!!" + should "Git test repository not found." def test_fake; assert true end end end diff --git a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb index c893bb67..4740853e 100644 --- a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb @@ -353,7 +353,7 @@ begin assert File.exist?(@adapter.class.template_path_for(version)) end else - puts "Mercurial test repository NOT FOUND. Skipping unit tests !!!" + should "Mercurial test repository not found." def test_fake; assert true end end end diff --git a/test/unit/lib/redmine/scm/adapters/subversion_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/subversion_adapter_test.rb index 7a36244f..e75ea9a1 100644 --- a/test/unit/lib/redmine/scm/adapters/subversion_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/subversion_adapter_test.rb @@ -47,7 +47,7 @@ begin end else - puts "Subversion test repository NOT FOUND. Skipping unit tests !!!" + should "Subversion test repository not found." def test_fake; assert true end end end diff --git a/test/unit/repository_bazaar_test.rb b/test/unit/repository_bazaar_test.rb index ba815d09..41adee4a 100644 --- a/test/unit/repository_bazaar_test.rb +++ b/test/unit/repository_bazaar_test.rb @@ -96,7 +96,7 @@ class RepositoryBazaarTest < ActiveSupport::TestCase assert_nil changeset.next end else - puts "Bazaar test repository NOT FOUND. Skipping unit tests !!!" + should "Bazaar test repository not found." def test_fake; assert true end end end diff --git a/test/unit/repository_cvs_test.rb b/test/unit/repository_cvs_test.rb index 36d23278..ce1a3f7c 100644 --- a/test/unit/repository_cvs_test.rb +++ b/test/unit/repository_cvs_test.rb @@ -98,7 +98,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase assert_equal entries[2].lastrev.author, 'LANG' end else - puts "CVS test repository NOT FOUND. Skipping unit tests !!!" + should "CVS test repository not found." def test_fake; assert true end end end diff --git a/test/unit/repository_darcs_test.rb b/test/unit/repository_darcs_test.rb index 870f3918..e3bf75a1 100644 --- a/test/unit/repository_darcs_test.rb +++ b/test/unit/repository_darcs_test.rb @@ -65,7 +65,7 @@ class RepositoryDarcsTest < ActiveSupport::TestCase end end else - puts "Darcs test repository NOT FOUND. Skipping unit tests !!!" + should "Darcs test repository not found." def test_fake; assert true end end end diff --git a/test/unit/repository_filesystem_test.rb b/test/unit/repository_filesystem_test.rb index af87ebf5..a791c29f 100644 --- a/test/unit/repository_filesystem_test.rb +++ b/test/unit/repository_filesystem_test.rb @@ -45,7 +45,7 @@ class RepositoryFilesystemTest < ActiveSupport::TestCase end else - puts "Filesystem test repository NOT FOUND. Skipping unit tests !!! See doc/RUNNING_TESTS." + should "Filesystem test repository not found." def test_fake; assert true end end end diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb index 9fed55c8..557e4e1a 100644 --- a/test/unit/repository_git_test.rb +++ b/test/unit/repository_git_test.rb @@ -305,7 +305,7 @@ class RepositoryGitTest < ActiveSupport::TestCase end end else - puts "Git test repository NOT FOUND. Skipping unit tests !!!" + should "Git test repository not found." def test_fake; assert true end end end diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb index b716e5b2..9874dbdb 100644 --- a/test/unit/repository_mercurial_test.rb +++ b/test/unit/repository_mercurial_test.rb @@ -273,7 +273,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase end end else - puts "Mercurial test repository NOT FOUND. Skipping unit tests !!!" + should "Mercurial test repository not found." def test_fake; assert true end end end diff --git a/test/unit/repository_subversion_test.rb b/test/unit/repository_subversion_test.rb index 5a077ad9..a050fef4 100644 --- a/test/unit/repository_subversion_test.rb +++ b/test/unit/repository_subversion_test.rb @@ -183,7 +183,7 @@ class RepositorySubversionTest < ActiveSupport::TestCase assert_nil changeset.next end else - puts "Subversion test repository NOT FOUND. Skipping unit tests !!!" + should "Subversion test repository not found." def test_fake; assert true end end end