summaryrefslogtreecommitdiff
path: root/test/rubygems
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-27 01:40:07 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-27 01:40:07 +0000
commit035ef0a3475943d92f813a6449a33dc07b6d4e4c (patch)
tree67116d189b67fad9406635921f7aaf088e69495d /test/rubygems
parentb9c485aa0d6f13303e7e9ab05c6d2b2496610a35 (diff)
* lib/rubygems: Update to RubyGems 1.8.6.1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems')
-rw-r--r--test/rubygems/bogussources.rb6
-rw-r--r--test/rubygems/fake_certlib/openssl.rb6
-rw-r--r--test/rubygems/fix_openssl_warnings.rb6
-rw-r--r--test/rubygems/foo/discover.rb6
-rw-r--r--test/rubygems/insure_session.rb6
-rw-r--r--test/rubygems/plugin/exception/rubygems_plugin.rb6
-rw-r--r--test/rubygems/plugin/load/rubygems_plugin.rb6
-rw-r--r--test/rubygems/plugin/standarderror/rubygems_plugin.rb6
-rw-r--r--test/rubygems/rubygems/commands/crash_command.rb6
-rw-r--r--test/rubygems/rubygems_plugin.rb6
-rw-r--r--test/rubygems/sff/discover.rb6
-rw-r--r--test/rubygems/simple_gem.rb6
-rw-r--r--test/rubygems/test_config.rb6
-rw-r--r--test/rubygems/test_gem.rb34
-rw-r--r--test/rubygems/test_gem_builder.rb6
-rw-r--r--test/rubygems/test_gem_command.rb6
-rw-r--r--test/rubygems/test_gem_command_manager.rb6
-rw-r--r--test/rubygems/test_gem_commands_build_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_cert_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_check_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_cleanup_command.rb8
-rw-r--r--test/rubygems/test_gem_commands_contents_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_dependency_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_environment_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_fetch_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_generate_index_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_help_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_install_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_list_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_lock_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_outdated_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_owner_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_pristine_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_push_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_query_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_server_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_sources_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_specification_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_stale_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_uninstall_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_unpack_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_update_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_which_command.rb30
-rw-r--r--test/rubygems/test_gem_config_file.rb6
-rw-r--r--test/rubygems/test_gem_dependency.rb6
-rw-r--r--test/rubygems/test_gem_dependency_installer.rb6
-rw-r--r--test/rubygems/test_gem_dependency_list.rb6
-rw-r--r--test/rubygems/test_gem_doc_manager.rb6
-rw-r--r--test/rubygems/test_gem_ext_configure_builder.rb6
-rw-r--r--test/rubygems/test_gem_ext_ext_conf_builder.rb6
-rw-r--r--test/rubygems/test_gem_ext_rake_builder.rb6
-rw-r--r--test/rubygems/test_gem_format.rb6
-rw-r--r--test/rubygems/test_gem_gem_path_searcher.rb6
-rw-r--r--test/rubygems/test_gem_gem_runner.rb6
-rw-r--r--test/rubygems/test_gem_gemcutter_utilities.rb6
-rw-r--r--test/rubygems/test_gem_indexer.rb6
-rw-r--r--test/rubygems/test_gem_install_update_options.rb6
-rw-r--r--test/rubygems/test_gem_installer.rb24
-rw-r--r--test/rubygems/test_gem_local_remote_options.rb6
-rw-r--r--test/rubygems/test_gem_package_tar_header.rb6
-rw-r--r--test/rubygems/test_gem_package_tar_input.rb6
-rw-r--r--test/rubygems/test_gem_package_tar_output.rb6
-rw-r--r--test/rubygems/test_gem_package_tar_reader.rb6
-rw-r--r--test/rubygems/test_gem_package_tar_reader_entry.rb6
-rw-r--r--test/rubygems/test_gem_package_tar_writer.rb6
-rw-r--r--test/rubygems/test_gem_package_task.rb6
-rw-r--r--test/rubygems/test_gem_path_support.rb15
-rw-r--r--test/rubygems/test_gem_platform.rb6
-rw-r--r--test/rubygems/test_gem_remote_fetcher.rb6
-rw-r--r--test/rubygems/test_gem_requirement.rb6
-rw-r--r--test/rubygems/test_gem_security.rb6
-rw-r--r--test/rubygems/test_gem_server.rb6
-rw-r--r--test/rubygems/test_gem_silent_ui.rb10
-rw-r--r--test/rubygems/test_gem_source_index.rb6
-rw-r--r--test/rubygems/test_gem_spec_fetcher.rb6
-rw-r--r--test/rubygems/test_gem_specification.rb6
-rw-r--r--test/rubygems/test_gem_stream_ui.rb24
-rw-r--r--test/rubygems/test_gem_text.rb6
-rw-r--r--test/rubygems/test_gem_uninstaller.rb8
-rw-r--r--test/rubygems/test_gem_validator.rb6
-rw-r--r--test/rubygems/test_gem_version.rb6
-rw-r--r--test/rubygems/test_gem_version_option.rb6
-rw-r--r--test/rubygems/test_kernel.rb6
83 files changed, 92 insertions, 511 deletions
diff --git a/test/rubygems/bogussources.rb b/test/rubygems/bogussources.rb
index fe12541..008e3a1 100644
--- a/test/rubygems/bogussources.rb
+++ b/test/rubygems/bogussources.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/test/rubygems/fake_certlib/openssl.rb b/test/rubygems/fake_certlib/openssl.rb
index aaf4873..9de90c0 100644
--- a/test/rubygems/fake_certlib/openssl.rb
+++ b/test/rubygems/fake_certlib/openssl.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/test/rubygems/fix_openssl_warnings.rb b/test/rubygems/fix_openssl_warnings.rb
index 313c636..66d6cdf 100644
--- a/test/rubygems/fix_openssl_warnings.rb
+++ b/test/rubygems/fix_openssl_warnings.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
##
# HACK: this drives me BONKERS
diff --git a/test/rubygems/foo/discover.rb b/test/rubygems/foo/discover.rb
index 284a221..e69de29 100644
--- a/test/rubygems/foo/discover.rb
+++ b/test/rubygems/foo/discover.rb
@@ -1,6 +0,0 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
diff --git a/test/rubygems/insure_session.rb b/test/rubygems/insure_session.rb
index 508450b..8a6df89 100644
--- a/test/rubygems/insure_session.rb
+++ b/test/rubygems/insure_session.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems'
def install_session
diff --git a/test/rubygems/plugin/exception/rubygems_plugin.rb b/test/rubygems/plugin/exception/rubygems_plugin.rb
index ef019a7..affa72f 100644
--- a/test/rubygems/plugin/exception/rubygems_plugin.rb
+++ b/test/rubygems/plugin/exception/rubygems_plugin.rb
@@ -1,8 +1,2 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
TestGem::TEST_PLUGIN_EXCEPTION = :loaded
raise Exception.new('boom') \ No newline at end of file
diff --git a/test/rubygems/plugin/load/rubygems_plugin.rb b/test/rubygems/plugin/load/rubygems_plugin.rb
index 9b37ce0..c7c7277 100644
--- a/test/rubygems/plugin/load/rubygems_plugin.rb
+++ b/test/rubygems/plugin/load/rubygems_plugin.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
class TestGem
TEST_PLUGIN_LOAD = :loaded
end
diff --git a/test/rubygems/plugin/standarderror/rubygems_plugin.rb b/test/rubygems/plugin/standarderror/rubygems_plugin.rb
index 44efaef..d36849f 100644
--- a/test/rubygems/plugin/standarderror/rubygems_plugin.rb
+++ b/test/rubygems/plugin/standarderror/rubygems_plugin.rb
@@ -1,8 +1,2 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
TestGem::TEST_PLUGIN_STANDARDERROR = :loaded
raise StandardError.new('boom') \ No newline at end of file
diff --git a/test/rubygems/rubygems/commands/crash_command.rb b/test/rubygems/rubygems/commands/crash_command.rb
index b34ac8e..e77b3fc 100644
--- a/test/rubygems/rubygems/commands/crash_command.rb
+++ b/test/rubygems/rubygems/commands/crash_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
class Gem::Commands::CrashCommand < Gem::Command
raise "crash"
diff --git a/test/rubygems/rubygems_plugin.rb b/test/rubygems/rubygems_plugin.rb
index e8c36a4..6c08f97 100644
--- a/test/rubygems/rubygems_plugin.rb
+++ b/test/rubygems/rubygems_plugin.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command_manager'
##
diff --git a/test/rubygems/sff/discover.rb b/test/rubygems/sff/discover.rb
index 284a221..e69de29 100644
--- a/test/rubygems/sff/discover.rb
+++ b/test/rubygems/sff/discover.rb
@@ -1,6 +0,0 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
diff --git a/test/rubygems/simple_gem.rb b/test/rubygems/simple_gem.rb
index 8253e4b..d7c0356 100644
--- a/test/rubygems/simple_gem.rb
+++ b/test/rubygems/simple_gem.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
SIMPLE_GEM = <<-GEMDATA
MD5SUM = "989bf34a1cbecd52e0ea66b662b3a405"
if $0 == __FILE__
diff --git a/test/rubygems/test_config.rb b/test/rubygems/test_config.rb
index 190b609..fae1a6f 100644
--- a/test/rubygems/test_config.rb
+++ b/test/rubygems/test_config.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems'
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index 88d8270..20f2a93 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems'
require 'rubygems/gem_openssl'
@@ -718,7 +712,7 @@ class TestGem < Gem::TestCase
def test_self_path_default
util_path
- if defined? APPLE_GEM_HOME
+ if defined?(APPLE_GEM_HOME)
orig_APPLE_GEM_HOME = APPLE_GEM_HOME
Object.send :remove_const, :APPLE_GEM_HOME
end
@@ -727,7 +721,7 @@ class TestGem < Gem::TestCase
assert_equal [Gem.default_path, Gem.dir].flatten.uniq, Gem.path
ensure
- Object.const_set :APPLE_GEM_HOME, orig_APPLE_GEM_HOME
+ Object.const_set :APPLE_GEM_HOME, orig_APPLE_GEM_HOME if orig_APPLE_GEM_HOME
end
unless win_platform?
@@ -736,11 +730,14 @@ class TestGem < Gem::TestCase
Gem.clear_paths
apple_gem_home = File.join @tempdir, 'apple_gem_home'
- Gem.const_set :APPLE_GEM_HOME, apple_gem_home
+
+ old, $-w = $-w, nil
+ Object.const_set :APPLE_GEM_HOME, apple_gem_home
+ $-w = old
assert_includes Gem.path, apple_gem_home
ensure
- Gem.send :remove_const, :APPLE_GEM_HOME
+ Object.send :remove_const, :APPLE_GEM_HOME
end
def test_self_path_APPLE_GEM_HOME_GEM_PATH
@@ -1074,6 +1071,23 @@ class TestGem < Gem::TestCase
assert_equal :loaded, TEST_PLUGIN_EXCEPTION rescue nil
end
+ def test_latest_load_paths
+ spec = quick_spec 'a', '4' do |s|
+ s.require_paths = ["lib"]
+ end
+
+ install_gem spec
+
+ # @exec_path = File.join spec.full_gem_path, spec.bindir, 'exec'
+ # @abin_path = File.join spec.full_gem_path, spec.bindir, 'abin'
+ # FileUtils.mkdir_p File.join(stem, "gems", "test-3")
+
+ Deprecate.skip_during do
+ expected = [File.join(@gemhome, "gems", "a-4", "lib")]
+ assert_equal expected, Gem.latest_load_paths
+ end
+ end
+
def with_plugin(path)
test_plugin_path = File.expand_path("test/rubygems/plugin/#{path}",
@@project_dir)
diff --git a/test/rubygems/test_gem_builder.rb b/test/rubygems/test_gem_builder.rb
index 5895b5f..0b4b972 100644
--- a/test/rubygems/test_gem_builder.rb
+++ b/test/rubygems/test_gem_builder.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/builder'
require 'rubygems/package'
diff --git a/test/rubygems/test_gem_command.rb b/test/rubygems/test_gem_command.rb
index f79b138..0376408 100644
--- a/test/rubygems/test_gem_command.rb
+++ b/test/rubygems/test_gem_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/command'
diff --git a/test/rubygems/test_gem_command_manager.rb b/test/rubygems/test_gem_command_manager.rb
index 54b26e1..6cb253d 100644
--- a/test/rubygems/test_gem_command_manager.rb
+++ b/test/rubygems/test_gem_command_manager.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/command_manager'
diff --git a/test/rubygems/test_gem_commands_build_command.rb b/test/rubygems/test_gem_commands_build_command.rb
index d4d7c29..55f5df6 100644
--- a/test/rubygems/test_gem_commands_build_command.rb
+++ b/test/rubygems/test_gem_commands_build_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/build_command'
require 'rubygems/format'
diff --git a/test/rubygems/test_gem_commands_cert_command.rb b/test/rubygems/test_gem_commands_cert_command.rb
index a514ea4..609fae8 100644
--- a/test/rubygems/test_gem_commands_cert_command.rb
+++ b/test/rubygems/test_gem_commands_cert_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/cert_command'
require 'rubygems/fix_openssl_warnings' if RUBY_VERSION < "1.9"
diff --git a/test/rubygems/test_gem_commands_check_command.rb b/test/rubygems/test_gem_commands_check_command.rb
index 688210d..a71c1eb 100644
--- a/test/rubygems/test_gem_commands_check_command.rb
+++ b/test/rubygems/test_gem_commands_check_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/check_command'
diff --git a/test/rubygems/test_gem_commands_cleanup_command.rb b/test/rubygems/test_gem_commands_cleanup_command.rb
index f2ed773..22bbfb7 100644
--- a/test/rubygems/test_gem_commands_cleanup_command.rb
+++ b/test/rubygems/test_gem_commands_cleanup_command.rb
@@ -1,14 +1,8 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/cleanup_command'
class TestGemCommandsCleanupCommand < Gem::TestCase
-
+
def setup
super
diff --git a/test/rubygems/test_gem_commands_contents_command.rb b/test/rubygems/test_gem_commands_contents_command.rb
index cf927e7..9995bed 100644
--- a/test/rubygems/test_gem_commands_contents_command.rb
+++ b/test/rubygems/test_gem_commands_contents_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/contents_command'
diff --git a/test/rubygems/test_gem_commands_dependency_command.rb b/test/rubygems/test_gem_commands_dependency_command.rb
index d3f2b68..4c559e2 100644
--- a/test/rubygems/test_gem_commands_dependency_command.rb
+++ b/test/rubygems/test_gem_commands_dependency_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/dependency_command'
diff --git a/test/rubygems/test_gem_commands_environment_command.rb b/test/rubygems/test_gem_commands_environment_command.rb
index 504a122..439057d 100644
--- a/test/rubygems/test_gem_commands_environment_command.rb
+++ b/test/rubygems/test_gem_commands_environment_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/environment_command'
diff --git a/test/rubygems/test_gem_commands_fetch_command.rb b/test/rubygems/test_gem_commands_fetch_command.rb
index 926e9e9..f4fee79 100644
--- a/test/rubygems/test_gem_commands_fetch_command.rb
+++ b/test/rubygems/test_gem_commands_fetch_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/package'
require 'rubygems/security'
diff --git a/test/rubygems/test_gem_commands_generate_index_command.rb b/test/rubygems/test_gem_commands_generate_index_command.rb
index b9eb139..ee4cd80 100644
--- a/test/rubygems/test_gem_commands_generate_index_command.rb
+++ b/test/rubygems/test_gem_commands_generate_index_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/indexer'
require 'rubygems/commands/generate_index_command'
diff --git a/test/rubygems/test_gem_commands_help_command.rb b/test/rubygems/test_gem_commands_help_command.rb
index acfc2da..d626b14 100644
--- a/test/rubygems/test_gem_commands_help_command.rb
+++ b/test/rubygems/test_gem_commands_help_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require "rubygems"
require "rubygems/test_case"
require "rubygems/commands/help_command"
diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb
index 522731b..bd61db5 100644
--- a/test/rubygems/test_gem_commands_install_command.rb
+++ b/test/rubygems/test_gem_commands_install_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/install_command'
diff --git a/test/rubygems/test_gem_commands_list_command.rb b/test/rubygems/test_gem_commands_list_command.rb
index 1339737..05afbc6 100644
--- a/test/rubygems/test_gem_commands_list_command.rb
+++ b/test/rubygems/test_gem_commands_list_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/list_command'
diff --git a/test/rubygems/test_gem_commands_lock_command.rb b/test/rubygems/test_gem_commands_lock_command.rb
index bb31346..8f30b7f 100644
--- a/test/rubygems/test_gem_commands_lock_command.rb
+++ b/test/rubygems/test_gem_commands_lock_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/lock_command'
diff --git a/test/rubygems/test_gem_commands_outdated_command.rb b/test/rubygems/test_gem_commands_outdated_command.rb
index ae15efe..72696d6 100644
--- a/test/rubygems/test_gem_commands_outdated_command.rb
+++ b/test/rubygems/test_gem_commands_outdated_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/outdated_command'
diff --git a/test/rubygems/test_gem_commands_owner_command.rb b/test/rubygems/test_gem_commands_owner_command.rb
index a07c309..65fe09e 100644
--- a/test/rubygems/test_gem_commands_owner_command.rb
+++ b/test/rubygems/test_gem_commands_owner_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/owner_command'
diff --git a/test/rubygems/test_gem_commands_pristine_command.rb b/test/rubygems/test_gem_commands_pristine_command.rb
index aa1f3bf..6bf6d5a 100644
--- a/test/rubygems/test_gem_commands_pristine_command.rb
+++ b/test/rubygems/test_gem_commands_pristine_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/pristine_command'
diff --git a/test/rubygems/test_gem_commands_push_command.rb b/test/rubygems/test_gem_commands_push_command.rb
index 7aa7109..13a107a 100644
--- a/test/rubygems/test_gem_commands_push_command.rb
+++ b/test/rubygems/test_gem_commands_push_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/push_command'
diff --git a/test/rubygems/test_gem_commands_query_command.rb b/test/rubygems/test_gem_commands_query_command.rb
index 4f06968..e718c0b 100644
--- a/test/rubygems/test_gem_commands_query_command.rb
+++ b/test/rubygems/test_gem_commands_query_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/query_command'
diff --git a/test/rubygems/test_gem_commands_server_command.rb b/test/rubygems/test_gem_commands_server_command.rb
index e27cc94..db27a4c 100644
--- a/test/rubygems/test_gem_commands_server_command.rb
+++ b/test/rubygems/test_gem_commands_server_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/server_command'
diff --git a/test/rubygems/test_gem_commands_sources_command.rb b/test/rubygems/test_gem_commands_sources_command.rb
index 7dea797..3d06940 100644
--- a/test/rubygems/test_gem_commands_sources_command.rb
+++ b/test/rubygems/test_gem_commands_sources_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/sources_command'
diff --git a/test/rubygems/test_gem_commands_specification_command.rb b/test/rubygems/test_gem_commands_specification_command.rb
index 512b9f5..735ceba 100644
--- a/test/rubygems/test_gem_commands_specification_command.rb
+++ b/test/rubygems/test_gem_commands_specification_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/specification_command'
diff --git a/test/rubygems/test_gem_commands_stale_command.rb b/test/rubygems/test_gem_commands_stale_command.rb
index 05cc9d2..74f730b 100644
--- a/test/rubygems/test_gem_commands_stale_command.rb
+++ b/test/rubygems/test_gem_commands_stale_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/stale_command'
diff --git a/test/rubygems/test_gem_commands_uninstall_command.rb b/test/rubygems/test_gem_commands_uninstall_command.rb
index 47f4960..a2c11b7 100644
--- a/test/rubygems/test_gem_commands_uninstall_command.rb
+++ b/test/rubygems/test_gem_commands_uninstall_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/installer_test_case'
require 'rubygems/commands/uninstall_command'
diff --git a/test/rubygems/test_gem_commands_unpack_command.rb b/test/rubygems/test_gem_commands_unpack_command.rb
index 3f07227..cd8716b 100644
--- a/test/rubygems/test_gem_commands_unpack_command.rb
+++ b/test/rubygems/test_gem_commands_unpack_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/unpack_command'
diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb
index b43be11..b283d48 100644
--- a/test/rubygems/test_gem_commands_update_command.rb
+++ b/test/rubygems/test_gem_commands_update_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/update_command'
diff --git a/test/rubygems/test_gem_commands_which_command.rb b/test/rubygems/test_gem_commands_which_command.rb
index 5e42deb..4985395 100644
--- a/test/rubygems/test_gem_commands_which_command.rb
+++ b/test/rubygems/test_gem_commands_which_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/which_command'
@@ -28,24 +22,38 @@ class TestGemCommandsWhichCommand < Gem::TestCase
assert_equal '', @ui.error
end
+ def test_execute_directory
+ @cmd.handle_options %w[directory]
+
+ use_ui @ui do
+ assert_raises Gem::MockGemUi::TermError do
+ @cmd.execute
+ end
+ end
+
+ assert_equal '', @ui.output
+ assert_match %r%Can.t find ruby library file or shared library directory\n%,
+ @ui.error
+ end
+
def test_execute_one_missing
# TODO: this test fails in isolation
util_foo_bar
- @cmd.handle_options %w[foo_bar missinglib]
+ @cmd.handle_options %w[foo_bar missing]
use_ui @ui do
@cmd.execute
end
assert_equal "#{@foo_bar.full_gem_path}/lib/foo_bar.rb\n", @ui.output
- assert_match %r%Can.t find ruby library file or shared library missinglib\n%,
+ assert_match %r%Can.t find ruby library file or shared library missing\n%,
@ui.error
end
def test_execute_missing
- @cmd.handle_options %w[missinglib]
+ @cmd.handle_options %w[missing]
use_ui @ui do
assert_raises Gem::MockGemUi::TermError do
@@ -54,12 +62,12 @@ class TestGemCommandsWhichCommand < Gem::TestCase
end
assert_equal '', @ui.output
- assert_match %r%Can.t find ruby library file or shared library missinglib\n%,
+ assert_match %r%Can.t find ruby library file or shared library missing\n%,
@ui.error
end
def util_foo_bar
- files = %w[lib/foo_bar.rb Rakefile]
+ files = %w[lib/foo_bar.rb lib/directory/baz.rb Rakefile]
@foo_bar = quick_spec 'foo_bar' do |gem|
gem.files = files
end
diff --git a/test/rubygems/test_gem_config_file.rb b/test/rubygems/test_gem_config_file.rb
index 424fd92..34c1953 100644
--- a/test/rubygems/test_gem_config_file.rb
+++ b/test/rubygems/test_gem_config_file.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/config_file'
diff --git a/test/rubygems/test_gem_dependency.rb b/test/rubygems/test_gem_dependency.rb
index a77ddf5..a792874 100644
--- a/test/rubygems/test_gem_dependency.rb
+++ b/test/rubygems/test_gem_dependency.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/dependency'
diff --git a/test/rubygems/test_gem_dependency_installer.rb b/test/rubygems/test_gem_dependency_installer.rb
index 48d85b8..03c1200 100644
--- a/test/rubygems/test_gem_dependency_installer.rb
+++ b/test/rubygems/test_gem_dependency_installer.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/dependency_installer'
require 'rubygems/security'
diff --git a/test/rubygems/test_gem_dependency_list.rb b/test/rubygems/test_gem_dependency_list.rb
index 348f111..8b920a8 100644
--- a/test/rubygems/test_gem_dependency_list.rb
+++ b/test/rubygems/test_gem_dependency_list.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/dependency_list'
diff --git a/test/rubygems/test_gem_doc_manager.rb b/test/rubygems/test_gem_doc_manager.rb
index f7ab641..226f69d 100644
--- a/test/rubygems/test_gem_doc_manager.rb
+++ b/test/rubygems/test_gem_doc_manager.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/doc_manager'
diff --git a/test/rubygems/test_gem_ext_configure_builder.rb b/test/rubygems/test_gem_ext_configure_builder.rb
index b8063f8..443d4b0 100644
--- a/test/rubygems/test_gem_ext_configure_builder.rb
+++ b/test/rubygems/test_gem_ext_configure_builder.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/ext'
diff --git a/test/rubygems/test_gem_ext_ext_conf_builder.rb b/test/rubygems/test_gem_ext_ext_conf_builder.rb
index 5caae8e..c050d82 100644
--- a/test/rubygems/test_gem_ext_ext_conf_builder.rb
+++ b/test/rubygems/test_gem_ext_ext_conf_builder.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/ext'
diff --git a/test/rubygems/test_gem_ext_rake_builder.rb b/test/rubygems/test_gem_ext_rake_builder.rb
index db0648b..d306643 100644
--- a/test/rubygems/test_gem_ext_rake_builder.rb
+++ b/test/rubygems/test_gem_ext_rake_builder.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/ext'
diff --git a/test/rubygems/test_gem_format.rb b/test/rubygems/test_gem_format.rb
index 85fb521..805455f 100644
--- a/test/rubygems/test_gem_format.rb
+++ b/test/rubygems/test_gem_format.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/package/tar_test_case'
require 'rubygems/simple_gem'
require 'rubygems/format'
diff --git a/test/rubygems/test_gem_gem_path_searcher.rb b/test/rubygems/test_gem_gem_path_searcher.rb
index c7f5af7..cb2afcd 100644
--- a/test/rubygems/test_gem_gem_path_searcher.rb
+++ b/test/rubygems/test_gem_gem_path_searcher.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/gem_path_searcher'
diff --git a/test/rubygems/test_gem_gem_runner.rb b/test/rubygems/test_gem_gem_runner.rb
index 3cb8410..c11368c 100644
--- a/test/rubygems/test_gem_gem_runner.rb
+++ b/test/rubygems/test_gem_gem_runner.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/gem_runner'
diff --git a/test/rubygems/test_gem_gemcutter_utilities.rb b/test/rubygems/test_gem_gemcutter_utilities.rb
index a01328f..db4ed19 100644
--- a/test/rubygems/test_gem_gemcutter_utilities.rb
+++ b/test/rubygems/test_gem_gemcutter_utilities.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems'
require 'rubygems/command'
diff --git a/test/rubygems/test_gem_indexer.rb b/test/rubygems/test_gem_indexer.rb
index a4f9bd4..f5bef8f 100644
--- a/test/rubygems/test_gem_indexer.rb
+++ b/test/rubygems/test_gem_indexer.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/indexer'
diff --git a/test/rubygems/test_gem_install_update_options.rb b/test/rubygems/test_gem_install_update_options.rb
index 2f0b911..473c7fe 100644
--- a/test/rubygems/test_gem_install_update_options.rb
+++ b/test/rubygems/test_gem_install_update_options.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/installer_test_case'
require 'rubygems/install_update_options'
require 'rubygems/command'
diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb
index 249b195..d3791d7 100644
--- a/test/rubygems/test_gem_installer.rb
+++ b/test/rubygems/test_gem_installer.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/installer_test_case'
class TestGemInstaller < Gem::InstallerTestCase
@@ -213,6 +207,24 @@ load Gem.bin_path('a', 'executable', version)
assert_match %r|generated by RubyGems|, wrapper
end
+ def test_generate_bin_bindir_with_user_install_warning
+
+ options = {
+ :bin_dir => "/usr/bin",
+ :install_dir => "/non/existant"
+ }
+
+ inst = Gem::Installer.new nil, options
+
+ Gem::Installer.path_warning = false
+
+ use_ui @ui do
+ inst.check_that_user_bin_dir_is_in_path
+ end
+
+ assert_equal "", @ui.error
+ end
+
def test_generate_bin_script
@installer.wrappers = true
util_make_exec
diff --git a/test/rubygems/test_gem_local_remote_options.rb b/test/rubygems/test_gem_local_remote_options.rb
index 8d79072..0141a31 100644
--- a/test/rubygems/test_gem_local_remote_options.rb
+++ b/test/rubygems/test_gem_local_remote_options.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/local_remote_options'
require 'rubygems/command'
diff --git a/test/rubygems/test_gem_package_tar_header.rb b/test/rubygems/test_gem_package_tar_header.rb
index 20d2204..5d85543 100644
--- a/test/rubygems/test_gem_package_tar_header.rb
+++ b/test/rubygems/test_gem_package_tar_header.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/package/tar_test_case'
require 'rubygems/package'
diff --git a/test/rubygems/test_gem_package_tar_input.rb b/test/rubygems/test_gem_package_tar_input.rb
index 72c1ce19..ee8e537 100644
--- a/test/rubygems/test_gem_package_tar_input.rb
+++ b/test/rubygems/test_gem_package_tar_input.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/package/tar_test_case'
require 'rubygems/package/tar_input'
diff --git a/test/rubygems/test_gem_package_tar_output.rb b/test/rubygems/test_gem_package_tar_output.rb
index 01b4a0f..ecf25ef 100644
--- a/test/rubygems/test_gem_package_tar_output.rb
+++ b/test/rubygems/test_gem_package_tar_output.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/package/tar_test_case'
require 'rubygems/package/tar_output'
require 'rubygems/security'
diff --git a/test/rubygems/test_gem_package_tar_reader.rb b/test/rubygems/test_gem_package_tar_reader.rb
index 657db9b..34e3044 100644
--- a/test/rubygems/test_gem_package_tar_reader.rb
+++ b/test/rubygems/test_gem_package_tar_reader.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/package/tar_test_case'
require 'rubygems/package'
diff --git a/test/rubygems/test_gem_package_tar_reader_entry.rb b/test/rubygems/test_gem_package_tar_reader_entry.rb
index 46e3046..92da220 100644
--- a/test/rubygems/test_gem_package_tar_reader_entry.rb
+++ b/test/rubygems/test_gem_package_tar_reader_entry.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/package/tar_test_case'
require 'rubygems/package'
diff --git a/test/rubygems/test_gem_package_tar_writer.rb b/test/rubygems/test_gem_package_tar_writer.rb
index ab9e5dd..88779e7 100644
--- a/test/rubygems/test_gem_package_tar_writer.rb
+++ b/test/rubygems/test_gem_package_tar_writer.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/package/tar_test_case'
require 'rubygems/package/tar_writer'
diff --git a/test/rubygems/test_gem_package_task.rb b/test/rubygems/test_gem_package_task.rb
index c53bdf4..35b38cd 100644
--- a/test/rubygems/test_gem_package_task.rb
+++ b/test/rubygems/test_gem_package_task.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems'
require 'rubygems/package_task'
diff --git a/test/rubygems/test_gem_path_support.rb b/test/rubygems/test_gem_path_support.rb
index 7fb0cca..bffc66f 100644
--- a/test/rubygems/test_gem_path_support.rb
+++ b/test/rubygems/test_gem_path_support.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems'
require 'fileutils'
@@ -34,6 +28,15 @@ class TestGemPathSupport < Gem::TestCase
assert_equal expected, ps.path
end
+ if defined?(File::ALT_SEPARATOR) and File::ALT_SEPARATOR
+ def test_initialize_home_normalize
+ alternate = @tempdir.gsub(File::SEPARATOR, File::ALT_SEPARATOR)
+ ps = Gem::PathSupport.new "GEM_HOME" => alternate
+
+ assert_equal @tempdir, ps.home, "normalize values"
+ end
+ end
+
def test_initialize_path
ps = Gem::PathSupport.new "GEM_PATH" => %W[#{@tempdir}/foo #{@tempdir}/bar]
diff --git a/test/rubygems/test_gem_platform.rb b/test/rubygems/test_gem_platform.rb
index f46a20f..4cb2f06 100644
--- a/test/rubygems/test_gem_platform.rb
+++ b/test/rubygems/test_gem_platform.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/platform'
require 'rbconfig'
diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb
index e039bb7..2ccb8ce 100644
--- a/test/rubygems/test_gem_remote_fetcher.rb
+++ b/test/rubygems/test_gem_remote_fetcher.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'ostruct'
require 'webrick'
diff --git a/test/rubygems/test_gem_requirement.rb b/test/rubygems/test_gem_requirement.rb
index b646171..0bc6ad7 100644
--- a/test/rubygems/test_gem_requirement.rb
+++ b/test/rubygems/test_gem_requirement.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require "rubygems/requirement"
diff --git a/test/rubygems/test_gem_security.rb b/test/rubygems/test_gem_security.rb
index 62156be..df3168d 100644
--- a/test/rubygems/test_gem_security.rb
+++ b/test/rubygems/test_gem_security.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/security'
require 'rubygems/fix_openssl_warnings' if RUBY_VERSION < "1.9"
diff --git a/test/rubygems/test_gem_server.rb b/test/rubygems/test_gem_server.rb
index bd4d960..82b3a5c 100644
--- a/test/rubygems/test_gem_server.rb
+++ b/test/rubygems/test_gem_server.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/server'
require 'stringio'
diff --git a/test/rubygems/test_gem_silent_ui.rb b/test/rubygems/test_gem_silent_ui.rb
index 8005b3b..cf5b1cd 100644
--- a/test/rubygems/test_gem_silent_ui.rb
+++ b/test/rubygems/test_gem_silent_ui.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/user_interaction'
require 'timeout'
@@ -55,7 +49,7 @@ class TestGemSilentUI < Gem::TestCase
assert_empty out, 'No output'
assert_empty err, 'No output'
-
+
out, err = capture_io do
use_ui @sui do
value = @sui.ask_yes_no 'Problem?', true
@@ -66,7 +60,7 @@ class TestGemSilentUI < Gem::TestCase
assert_empty err, 'No output'
assert value, 'Value is true'
-
+
out, err = capture_io do
use_ui @sui do
value = @sui.ask_yes_no 'Problem?', false
diff --git a/test/rubygems/test_gem_source_index.rb b/test/rubygems/test_gem_source_index.rb
index 462ecbe..8d0885c 100644
--- a/test/rubygems/test_gem_source_index.rb
+++ b/test/rubygems/test_gem_source_index.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/source_index'
require 'rubygems/config_file'
diff --git a/test/rubygems/test_gem_spec_fetcher.rb b/test/rubygems/test_gem_spec_fetcher.rb
index 073b082..015d2ee 100644
--- a/test/rubygems/test_gem_spec_fetcher.rb
+++ b/test/rubygems/test_gem_spec_fetcher.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/spec_fetcher'
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index 0213f95..0ca1a0a 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'stringio'
require 'rubygems/specification'
diff --git a/test/rubygems/test_gem_stream_ui.rb b/test/rubygems/test_gem_stream_ui.rb
index 2a99af0..f483568 100644
--- a/test/rubygems/test_gem_stream_ui.rb
+++ b/test/rubygems/test_gem_stream_ui.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/user_interaction'
require 'timeout'
@@ -41,6 +35,9 @@ class TestGemStreamUI < Gem::TestCase
end
def test_ask
+ skip 'TTY detection broken on windows' if
+ Gem.win_platform? unless RUBY_VERSION > '1.9.2'
+
timeout(1) do
expected_answer = "Arthur, King of the Britons"
@in.string = "#{expected_answer}\n"
@@ -50,6 +47,9 @@ class TestGemStreamUI < Gem::TestCase
end
def test_ask_no_tty
+ skip 'TTY detection broken on windows' if
+ Gem.win_platform? unless RUBY_VERSION > '1.9.2'
+
@in.tty = false
timeout(0.1) do
@@ -59,6 +59,9 @@ class TestGemStreamUI < Gem::TestCase
end
def test_ask_for_password
+ skip 'Always uses $stdin on windows' if
+ Gem.win_platform? unless RUBY_VERSION > '1.9.2'
+
timeout(1) do
expected_answer = "Arthur, King of the Britons"
@in.string = "#{expected_answer}\n"
@@ -68,6 +71,9 @@ class TestGemStreamUI < Gem::TestCase
end
def test_ask_for_password_no_tty
+ skip 'TTY handling is broken on windows' if
+ Gem.win_platform? unless RUBY_VERSION > '1.9.2'
+
@in.tty = false
timeout(0.1) do
@@ -77,6 +83,9 @@ class TestGemStreamUI < Gem::TestCase
end
def test_ask_yes_no_no_tty_with_default
+ skip 'TTY handling is broken on windows' if
+ Gem.win_platform? unless RUBY_VERSION > '1.9.2'
+
@in.tty = false
timeout(0.1) do
@@ -89,6 +98,9 @@ class TestGemStreamUI < Gem::TestCase
end
def test_ask_yes_no_no_tty_without_default
+ skip 'TTY handling is broken on windows' if
+ Gem.win_platform? unless RUBY_VERSION > '1.9.2'
+
@in.tty = false
timeout(0.1) do
diff --git a/test/rubygems/test_gem_text.rb b/test/rubygems/test_gem_text.rb
index 7324e42..7974bd4 100644
--- a/test/rubygems/test_gem_text.rb
+++ b/test/rubygems/test_gem_text.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require "rubygems/text"
diff --git a/test/rubygems/test_gem_uninstaller.rb b/test/rubygems/test_gem_uninstaller.rb
index 79720e6..a94fc43 100644
--- a/test/rubygems/test_gem_uninstaller.rb
+++ b/test/rubygems/test_gem_uninstaller.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/installer_test_case'
require 'rubygems/uninstaller'
@@ -216,7 +210,7 @@ class TestGemUninstaller < Gem::InstallerTestCase
def test_uninstall_selection_greater_than_one
util_make_gems
-
+
list = Gem::Specification.find_all_by_name('a')
uninstaller = Gem::Uninstaller.new('a')
diff --git a/test/rubygems/test_gem_validator.rb b/test/rubygems/test_gem_validator.rb
index 304c141..58e94bf 100644
--- a/test/rubygems/test_gem_validator.rb
+++ b/test/rubygems/test_gem_validator.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require "rubygems/simple_gem"
require 'rubygems/validator'
diff --git a/test/rubygems/test_gem_version.rb b/test/rubygems/test_gem_version.rb
index d6a15ec..f578063 100644
--- a/test/rubygems/test_gem_version.rb
+++ b/test/rubygems/test_gem_version.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require "rubygems/version"
diff --git a/test/rubygems/test_gem_version_option.rb b/test/rubygems/test_gem_version_option.rb
index bcb594e..cbe819c 100644
--- a/test/rubygems/test_gem_version_option.rb
+++ b/test/rubygems/test_gem_version_option.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/command'
require 'rubygems/version_option'
diff --git a/test/rubygems/test_kernel.rb b/test/rubygems/test_kernel.rb
index 32658c5..6210422 100644
--- a/test/rubygems/test_kernel.rb
+++ b/test/rubygems/test_kernel.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
class TestKernel < Gem::TestCase