diff options
-rw-r--r-- | test/rubygems/helper.rb | 8 | ||||
-rw-r--r-- | test/rubygems/packages/ill-formatted-platform-1.0.0.10.gem | bin | 0 -> 10240 bytes | |||
-rw-r--r-- | test/rubygems/test_gem_bundler_version_finder.rb | 4 | ||||
-rw-r--r-- | test/rubygems/test_gem_command.rb | 12 | ||||
-rw-r--r-- | test/rubygems/test_gem_commands_help_command.rb | 7 | ||||
-rw-r--r-- | test/rubygems/test_gem_commands_push_command.rb | 5 | ||||
-rw-r--r-- | test/rubygems/test_gem_commands_setup_command.rb | 4 | ||||
-rw-r--r-- | test/rubygems/test_gem_commands_signin_command.rb | 7 | ||||
-rw-r--r-- | test/rubygems/test_gem_dependency.rb | 6 | ||||
-rw-r--r-- | test/rubygems/test_gem_ext_builder.rb | 6 | ||||
-rw-r--r-- | test/rubygems/test_gem_ext_ext_conf_builder.rb | 1 | ||||
-rw-r--r-- | test/rubygems/test_gem_ext_rake_builder.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem_gemcutter_utilities.rb | 6 | ||||
-rw-r--r-- | test/rubygems/test_gem_installer.rb | 20 | ||||
-rw-r--r-- | test/rubygems/test_gem_specification.rb | 6 | ||||
-rw-r--r-- | test/rubygems/test_kernel.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_require.rb | 2 |
17 files changed, 72 insertions, 26 deletions
@@ -544,6 +544,10 @@ class Gem::TestCase < Test::Unit::TestCase Gem.pre_uninstall_hooks.clear end ## # A git_gem is used with a gem dependencies file. The gem created here # has no files, just a gem specification for the given +name+ and +version+. @@ -1291,7 +1295,7 @@ Also, a list: end def ruby_with_rubygems_in_load_path - [Gem.ruby, "-I", File.expand_path("../../lib", __dir__)] end def with_clean_path_to_ruby @@ -1591,7 +1595,7 @@ class Object metaclass.send :undef_method, name metaclass.send :alias_method, name, new_name metaclass.send :undef_method, new_name - end unless method_defined?(:stub) # lib/resolv/test_dns.rb also has the same method definition end require_relative 'utilities' Binary files differ@@ -6,14 +6,12 @@ class TestGemBundlerVersionFinder < Gem::TestCase super @argv = ARGV.dup - @env = ENV.to_hash.clone - ENV.delete("BUNDLER_VERSION") @dollar_0 = $0 end def teardown ARGV.replace @argv - ENV.replace @env $0 = @dollar_0 super @@ -189,6 +189,18 @@ class TestGemCommand < Gem::TestCase assert_match %r{Usage: gem doit}, @ui.output end def test_option_recognition @cmd.add_option('-h', '--help [COMMAND]', 'Get help on COMMAND') do |value, options| options[:help] = true @@ -35,6 +35,13 @@ class TestGemCommandsHelpCommand < Gem::TestCase end end def test_gem_help_commands mgr = Gem::CommandManager.new @@ -155,7 +155,6 @@ class TestGemCommandsPushCommand < Gem::TestCase @host => @api_key, } - FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path File.open Gem.configuration.credentials_path, 'w' do |f| f.write keys.to_yaml end @@ -190,7 +189,6 @@ class TestGemCommandsPushCommand < Gem::TestCase @host => @api_key, } - FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path File.open Gem.configuration.credentials_path, 'w' do |f| f.write keys.to_yaml end @@ -232,7 +230,6 @@ class TestGemCommandsPushCommand < Gem::TestCase :rubygems_api_key => @api_key, } - FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path File.open Gem.configuration.credentials_path, 'w' do |f| f.write keys.to_yaml end @@ -274,7 +271,6 @@ class TestGemCommandsPushCommand < Gem::TestCase @host => @api_key, } - FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path File.open Gem.configuration.credentials_path, 'w' do |f| f.write keys.to_yaml end @@ -305,7 +301,6 @@ class TestGemCommandsPushCommand < Gem::TestCase host => api_key, } - FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path File.open Gem.configuration.credentials_path, 'w' do |f| f.write keys.to_yaml end @@ -175,7 +175,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase assert_path_exist File.join(dir, 'bundler.rb') assert_path_exist File.join(dir, 'bundler/b.rb') - assert_path_exist File.join(dir, 'bundler/templates/.circleci/config.yml') unless RUBY_ENGINE == "truffleruby" # https://.com/oracle/truffleruby/issues/2116 assert_path_exist File.join(dir, 'bundler/templates/.travis.yml') end end @@ -272,7 +272,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase @cmd.remove_old_lib_files lib - files_that_go.each {|file| assert_path_not_exist(file) unless file == old_bundler_ci && RUBY_ENGINE == "truffleruby" } # https://.com/oracle/truffleruby/issues/2116 files_that_stay.each {|file| assert_path_exist file } end @@ -26,6 +26,13 @@ class TestGemCommandsSigninCommand < Gem::TestCase assert_match %r{Signed in.}, sign_in_ui.output end def test_execute_when_already_signed_in_with_same_host host = 'http://some-gemcutter-compatible-host.org' @@ -3,6 +3,12 @@ require_relative 'helper' require 'rubygems/dependency' class TestGemDependency < Gem::TestCase def test_initialize d = dep "pkg", "> 1.0" @@ -106,7 +106,7 @@ install: end def test_build_extensions - skip if /mswin/ =~ RUBY_PLATFORM && ENV.key?('_ACTIONS') # not working from the beginning @spec.extensions << 'ext/extconf.rb' ext_dir = File.join @spec.gem_dir, 'ext' @@ -142,7 +142,7 @@ install: end def test_build_extensions_with_gemhome_with_space - skip if /mswin/ =~ RUBY_PLATFORM && ENV.key?('_ACTIONS') # not working from the beginning new_gemhome = File.join @tempdir, 'gem home' File.rename(@gemhome, new_gemhome) @gemhome = new_gemhome @@ -163,7 +163,7 @@ install: false end end - skip if /mswin/ =~ RUBY_PLATFORM && ENV.key?('_ACTIONS') # not working from the beginning @spec.extensions << 'ext/extconf.rb' @@ -41,6 +41,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase assert_contains_make_command '', output[7] assert_contains_make_command 'install', output[10] assert_empty Dir.glob(File.join(@ext, 'siteconf*.rb')) end def test_class_build_rbconfig_make_prog @@ -48,6 +48,8 @@ class TestGemExtRakeBuilder < Gem::TestCase end def test_class_no_openssl_override create_temp_mkrf_file('task :default') rake = util_spec 'rake' do |s| @@ -35,8 +35,6 @@ class TestGemGemcutterUtilities < Gem::TestCase "http://rubygems.engineyard.com" => "EYKEY", } - FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path - File.open Gem.configuration.credentials_path, 'w' do |f| f.write keys.to_yaml end @@ -50,7 +48,6 @@ class TestGemGemcutterUtilities < Gem::TestCase def test_api_key keys = { :rubygems_api_key => 'KEY' } - FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path File.open Gem.configuration.credentials_path, 'w' do |f| f.write keys.to_yaml @@ -63,7 +60,6 @@ class TestGemGemcutterUtilities < Gem::TestCase def test_api_key_override keys = { :rubygems_api_key => 'KEY', :other => 'OTHER' } - FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path File.open Gem.configuration.credentials_path, 'w' do |f| f.write keys.to_yaml @@ -168,7 +164,6 @@ class TestGemGemcutterUtilities < Gem::TestCase api_key = 'a5fdbb6ba150cbb83aad2bb2fede64cf040453903' other_api_key = 'f46dbb18bb6a9c97cdc61b5b85c186a17403cdcbf' - FileUtils.mkdir_p File.dirname(Gem.configuration.credentials_path) File.open Gem.configuration.credentials_path, 'w' do |f| f.write Hash[:other_api_key, other_api_key].to_yaml end @@ -246,7 +241,6 @@ class TestGemGemcutterUtilities < Gem::TestCase def test_verify_api_key keys = {:other => 'a5fdbb6ba150cbb83aad2bb2fede64cf040453903'} - FileUtils.mkdir_p File.dirname(Gem.configuration.credentials_path) File.open Gem.configuration.credentials_path, 'w' do |f| f.write keys.to_yaml end @@ -1776,6 +1776,26 @@ gem 'other', version end end def test_shebang installer = setup_base_installer @@ -3612,7 +3612,7 @@ Did you mean 'Ruby'? @m2.validate end - assert_equal "metadata key too large (129 > 128)", e.message end end @@ -3629,7 +3629,7 @@ Did you mean 'Ruby'? @m2.validate end - assert_equal "metadata values must be a String", e.message end end @@ -3646,7 +3646,7 @@ Did you mean 'Ruby'? @m2.validate end - assert_equal "metadata value too large (1025 > 1024)", e.message end end @@ -8,6 +8,8 @@ class TestKernel < Gem::TestCase @old_path = $:.dup util_make_gems end def teardown @@ -679,8 +679,6 @@ class TestGemRequire < Gem::TestCase end def test_no_crash_when_overriding_warn_with_warning_module - pend "https://.com/oracle/truffleruby/issues/2109" if RUBY_ENGINE == "truffleruby" - Dir.mktmpdir("warn_test") do |dir| File.write(dir + "/main.rb", "module Warning; def warn(str); super; end; end; warn 'Foo Bar'") _, err = capture_subprocess_io do |