diff options
Diffstat (limited to 'test/rubygems')
83 files changed, 92 insertions, 511 deletions
diff --git a/test/rubygems/bogussources.rb b/test/rubygems/bogussources.rb index fe12541c3d..008e3a1de5 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 aaf48735c0..9de90c0a10 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 313c63628f..66d6cdf3eb 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 284a221bf9..e69de29bb2 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 508450b23b..8a6df89246 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 ef019a7193..affa72f09c 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 9b37ce09f3..c7c72777aa 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 44efaef48a..d36849f144 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 b34ac8e2f3..e77b3fcd72 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 e8c36a4a3f..6c08f97c6d 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 284a221bf9..e69de29bb2 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 8253e4b2eb..d7c035675c 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 190b6092f1..fae1a6ff54 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 88d8270ad3..20f2a93c04 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 5895b5f458..0b4b972367 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 f79b138df2..037640890c 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 54b26e1b9e..6cb253d386 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 d4d7c29b72..55f5df6f8b 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 a514ea41f2..609fae8884 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 688210d3d1..a71c1ebb92 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 f2ed7736b0..22bbfb7a2f 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 cf927e73dd..9995bed8d7 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 d3f2b68640..4c559e2349 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 504a12239d..439057df9d 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 926e9e97e0..f4fee79ea3 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 b9eb139f6c..ee4cd8051e 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 acfc2daefc..d626b1436a 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 522731b60e..bd61db5e45 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 1339737391..05afbc6f8d 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 bb3134661d..8f30b7f2cc 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 ae15efee70..72696d6549 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 a07c3095aa..65fe09e09f 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 aa1f3bf7a6..6bf6d5a56c 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 7aa7109c45..13a107aaf3 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 4f06968344..e718c0bcbb 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 e27cc94896..db27a4c932 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 7dea7971d2..3d06940232 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 512b9f50cf..735ceba4cd 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 05cc9d234b..74f730bfa5 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 47f4960145..a2c11b7216 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 3f072277f1..cd8716b36b 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 b43be11843..b283d484e3 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 5e42debb74..4985395871 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 424fd92f80..34c19539e7 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 a77ddf5e2d..a79287414e 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 48d85b8ed4..03c1200b40 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 348f111391..8b920a8f9f 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 f7ab6416c0..226f69d9cf 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 b8063f8021..443d4b06b5 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 5caae8e973..c050d82f9c 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 db0648b2b4..d30664372d 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 85fb521c67..805455f763 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 c7f5af777c..cb2afcdd26 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 3cb841058d..c11368c3e4 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 a01328fbab..db4ed19d08 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 a4f9bd454b..f5bef8fa3c 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 2f0b911604..473c7fee41 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 249b195fd7..d3791d7911 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 8d7907268d..0141a3150d 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 20d2204ad7..5d855435ec 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 72c1ce194a..ee8e53712c 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 01b4a0fa3a..ecf25ef107 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 657db9b367..34e30441d8 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 46e30466b9..92da220fa6 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 ab9e5dd47d..88779e7079 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 c53bdf4619..35b38cdbc7 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 7fb0ccacc5..bffc66f7dc 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 f46a20fb41..4cb2f067c1 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 e039bb76bd..2ccb8ce37a 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 b646171673..0bc6ad7059 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 62156be4f5..df3168dce4 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 bd4d960ecc..82b3a5c948 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 8005b3b1cc..cf5b1cd6e0 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 462ecbe8fe..8d0885c860 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 073b082b06..015d2eec7d 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 0213f95e02..0ca1a0a94a 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 2a99af037e..f4835685a1 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 7324e42b46..7974bd4e86 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 79720e6650..a94fc43ff9 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 304c141483..58e94bfed0 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 d6a15ec459..f578063edc 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 bcb594e8dd..cbe819c22e 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 32658c5543..6210422506 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 |