diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-02 11:48:18 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-02 11:48:18 +0000 |
commit | f28be7e02d113bd26c33cb94e65004055576c065 (patch) | |
tree | 48b87f5a2b647e1207bae5e29f40d6d5b526978d /test | |
parent | 537024433720d7c54cba9bab4596638f59fbadc9 (diff) | |
download | ruby-f28be7e02d113bd26c33cb94e65004055576c065.tar.gz |
Merge rubygems/rubygems from upstream.
The current master branch is
https://github.com/rubygems/rubygems/commit/97b264f0fa248c864b6ee9a23d3ff1cdd217dddb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
20 files changed, 201 insertions, 70 deletions
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index ad802e0f95..abf7092991 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb @@ -954,37 +954,23 @@ class TestGem < Gem::TestCase end def test_self_ruby_escaping_spaces_in_path - orig_bindir = RbConfig::CONFIG['bindir'] - orig_exe_ext = RbConfig::CONFIG['EXEEXT'] - - RbConfig::CONFIG['bindir'] = "C:/Ruby 1.8/bin" - RbConfig::CONFIG['EXEEXT'] = ".exe" - - ruby_install_name "ruby" do - with_clean_path_to_ruby do - assert_equal "\"C:/Ruby 1.8/bin/ruby.exe\"", Gem.ruby + with_clean_path_to_ruby do + with_bindir_and_exeext("C:/Ruby 1.8/bin", ".exe") do + ruby_install_name "ruby" do + assert_equal "\"C:/Ruby 1.8/bin/ruby.exe\"", Gem.ruby + end end end - ensure - RbConfig::CONFIG['bindir'] = orig_bindir - RbConfig::CONFIG['EXEEXT'] = orig_exe_ext end def test_self_ruby_path_without_spaces - orig_bindir = RbConfig::CONFIG['bindir'] - orig_exe_ext = RbConfig::CONFIG['EXEEXT'] - - RbConfig::CONFIG['bindir'] = "C:/Ruby18/bin" - RbConfig::CONFIG['EXEEXT'] = ".exe" - - ruby_install_name "ruby" do - with_clean_path_to_ruby do - assert_equal "C:/Ruby18/bin/ruby.exe", Gem.ruby + with_clean_path_to_ruby do + with_bindir_and_exeext("C:/Ruby18/bin", ".exe") do + ruby_install_name "ruby" do + assert_equal "C:/Ruby18/bin/ruby.exe", Gem.ruby + end end end - ensure - RbConfig::CONFIG['bindir'] = orig_bindir - RbConfig::CONFIG['EXEEXT'] = orig_exe_ext end def test_self_ruby_api_version @@ -1902,6 +1888,19 @@ You may need to `gem install -g` to install missing gems end end + def with_bindir_and_exeext(bindir, exeext) + orig_bindir = RbConfig::CONFIG['bindir'] + orig_exe_ext = RbConfig::CONFIG['EXEEXT'] + + RbConfig::CONFIG['bindir'] = bindir + RbConfig::CONFIG['EXEEXT'] = exeext + + yield + ensure + RbConfig::CONFIG['bindir'] = orig_bindir + RbConfig::CONFIG['EXEEXT'] = orig_exe_ext + end + def with_clean_path_to_ruby orig_ruby = Gem.ruby @@ -1909,7 +1908,7 @@ You may need to `gem install -g` to install missing gems yield ensure - Gem.instance_variable_set("@ruby", orig_ruby) + Gem.instance_variable_set :@ruby, orig_ruby end def with_plugin(path) diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb index 1812c221b5..fb7629c12e 100644 --- a/test/rubygems/test_gem_commands_install_command.rb +++ b/test/rubygems/test_gem_commands_install_command.rb @@ -614,7 +614,6 @@ ERROR: Possible alternatives: non_existent_with_hint assert_equal args, a2.build_args end - def test_execute_remote spec_fetcher do |fetcher| fetcher.gem 'a', 2 diff --git a/test/rubygems/test_gem_commands_owner_command.rb b/test/rubygems/test_gem_commands_owner_command.rb index 7c86e1f5e8..799d631f8a 100644 --- a/test/rubygems/test_gem_commands_owner_command.rb +++ b/test/rubygems/test_gem_commands_owner_command.rb @@ -68,7 +68,6 @@ EOF end end - def test_show_owners_setting_up_host_through_env_var response = "- email: user1@example.com\n" host = "http://rubygems.example" diff --git a/test/rubygems/test_gem_commands_pristine_command.rb b/test/rubygems/test_gem_commands_pristine_command.rb index 8df8e8a744..962ea96a2a 100644 --- a/test/rubygems/test_gem_commands_pristine_command.rb +++ b/test/rubygems/test_gem_commands_pristine_command.rb @@ -542,8 +542,10 @@ class TestGemCommandsPristineCommand < Gem::TestCase @cmd.options[:extensions_set] = true @cmd.options[:args] = [] - use_ui @ui do - @cmd.execute + util_set_arch "x86_64-darwin" do + use_ui @ui do + @cmd.execute + end end out = @ui.output.split "\n" diff --git a/test/rubygems/test_gem_commands_push_command.rb b/test/rubygems/test_gem_commands_push_command.rb index 955dc7ced3..b4f51cdc35 100644 --- a/test/rubygems/test_gem_commands_push_command.rb +++ b/test/rubygems/test_gem_commands_push_command.rb @@ -250,7 +250,6 @@ class TestGemCommandsPushCommand < Gem::TestCase spec.metadata['allowed_push_host'] = "https://privategemserver.example" end - response = %{ERROR: "#{@host}" is not allowed by the gemspec, which only allows "https://privategemserver.example"} assert_raises Gem::MockGemUi::TermError do diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb index 569091a8a7..87ec5c204c 100644 --- a/test/rubygems/test_gem_commands_setup_command.rb +++ b/test/rubygems/test_gem_commands_setup_command.rb @@ -57,6 +57,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase FileUtils.mkdir_p 'default/gems' gemspec = Gem::Specification.new + gemspec.author = "Us" gemspec.name = "bundler" gemspec.version = BUNDLER_VERS gemspec.bindir = "exe" @@ -185,16 +186,19 @@ class TestGemCommandsSetupCommand < Gem::TestCase def test_install_default_bundler_gem @cmd.extend FileUtils - @cmd.install_default_bundler_gem + bin_dir = File.join(@gemhome, 'bin') + @cmd.install_default_bundler_gem bin_dir - if Gem.win_platform? - bundler_spec = Gem::Specification.load("bundler/bundler.gemspec") - default_spec_path = File.join(Gem::Specification.default_specifications_dir, "#{bundler_spec.full_name}.gemspec") - spec = Gem::Specification.load(default_spec_path) + bundler_spec = Gem::Specification.load("bundler/bundler.gemspec") + default_spec_path = File.join(Gem::Specification.default_specifications_dir, "#{bundler_spec.full_name}.gemspec") + spec = Gem::Specification.load(default_spec_path) - spec.executables.each do |e| - assert_path_exists File.join(spec.bin_dir, "#{e}.bat") + spec.executables.each do |e| + if Gem.win_platform? + assert_path_exists File.join(bin_dir, "#{e}.bat") end + + assert_path_exists File.join bin_dir, e end default_dir = Gem::Specification.default_specifications_dir diff --git a/test/rubygems/test_gem_commands_uninstall_command.rb b/test/rubygems/test_gem_commands_uninstall_command.rb index efe5a768ef..34b1838486 100644 --- a/test/rubygems/test_gem_commands_uninstall_command.rb +++ b/test/rubygems/test_gem_commands_uninstall_command.rb @@ -197,6 +197,62 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase assert File.exist? File.join(@gemhome, 'bin', 'executable') end + def test_uninstall_selection + ui = Gem::MockGemUi.new "1\n" + + util_make_gems + + list = Gem::Specification.find_all_by_name 'a' + + @cmd.options[:args] = ['a'] + + use_ui ui do + @cmd.execute + end + + updated_list = Gem::Specification.find_all_by_name('a') + assert_equal list.length - 1, updated_list.length + + assert_match ' 1. a-1', ui.output + assert_match ' 2. a-2', ui.output + assert_match ' 3. a-3.a', ui.output + assert_match ' 4. All versions', ui.output + assert_match 'uninstalled a-1', ui.output + end + + def test_uninstall_selection_multiple_gems + ui = Gem::MockGemUi.new "1\n" + + util_make_gems + + a_list = Gem::Specification.find_all_by_name('a') + b_list = Gem::Specification.find_all_by_name('b') + list = a_list + b_list + + @cmd.options[:args] = ['a', 'b'] + + use_ui ui do + @cmd.execute + end + + updated_a_list = Gem::Specification.find_all_by_name('a') + updated_b_list = Gem::Specification.find_all_by_name('b') + updated_list = updated_a_list + updated_b_list + + assert_equal list.length - 2, updated_list.length + + out = ui.output.split("\n") + assert_match 'uninstalled b-2', out.shift + assert_match '', out.shift + assert_match 'Select gem to uninstall:', out.shift + assert_match ' 1. a-1', out.shift + assert_match ' 2. a-2', out.shift + assert_match ' 3. a-3.a', out.shift + assert_match ' 4. All versions', out.shift + assert_match 'uninstalled a-1', out.shift + assert_empty out + end + def test_execute_with_force_and_without_version_uninstalls_everything ui = Gem::MockGemUi.new "y\n" @@ -251,7 +307,7 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase gemhome2 = "#{@gemhome}2" a_4, = util_gem 'a', 4 - install_gem a_4, :install_dir => gemhome2 + install_gem a_4 Gem::Specification.dirs = [@gemhome, gemhome2] @@ -269,6 +325,29 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase assert_equal %w[default-1], Gem::Specification.all_names.sort end + def test_execute_outside_gem_home + ui = Gem::MockGemUi.new "y\n" + + gemhome2 = "#{@gemhome}2" + + a_4, = util_gem 'a', 4 + install_gem a_4 , :install_dir => gemhome2 + + Gem::Specification.dirs = [@gemhome, gemhome2] + + assert_includes Gem::Specification.all_names, 'a-4' + + @cmd.options[:args] = ['a:4'] + + e = assert_raises Gem::InstallError do + use_ui ui do + @cmd.execute + end + end + + assert_includes e.message, "a is not installed in GEM_HOME" + end + def test_handle_options @cmd.handle_options %w[] diff --git a/test/rubygems/test_gem_commands_yank_command.rb b/test/rubygems/test_gem_commands_yank_command.rb index 602b137d48..1aafc92bfb 100644 --- a/test/rubygems/test_gem_commands_yank_command.rb +++ b/test/rubygems/test_gem_commands_yank_command.rb @@ -49,7 +49,6 @@ class TestGemCommandsYankCommand < Gem::TestCase assert_match %r%Yanking gem from http://example%, @ui.output assert_match %r%Successfully yanked%, @ui.output - platform = Gem.platforms[1] body = @fetcher.last_request.body.split('&').sort assert_equal %W[gem_name=a platform=#{platform} version=1.0], body diff --git a/test/rubygems/test_gem_dependency.rb b/test/rubygems/test_gem_dependency.rb index daeb8f625c..bf2f065573 100644 --- a/test/rubygems/test_gem_dependency.rb +++ b/test/rubygems/test_gem_dependency.rb @@ -385,5 +385,4 @@ class TestGemDependency < Gem::TestCase assert_match "Could not find 'b' (= 2.0) among 1 total gem(s)", e.message end - end diff --git a/test/rubygems/test_gem_dependency_installer.rb b/test/rubygems/test_gem_dependency_installer.rb index bf65cf9ed3..48912ee0cd 100644 --- a/test/rubygems/test_gem_dependency_installer.rb +++ b/test/rubygems/test_gem_dependency_installer.rb @@ -56,7 +56,9 @@ class TestGemDependencyInstaller < Gem::TestCase inst = Gem::DependencyInstaller.new - available = inst.available_set_for 'a', Gem::Requirement.default + available = Gem::Deprecate.skip_during do + inst.available_set_for 'a', Gem::Requirement.default + end assert_equal %w[a-1], available.set.map { |s| s.spec.full_name } end @@ -68,7 +70,9 @@ class TestGemDependencyInstaller < Gem::TestCase inst = Gem::DependencyInstaller.new :prerelease => true - available = inst.available_set_for 'a', Gem::Requirement.default + available = Gem::Deprecate.skip_during do + inst.available_set_for 'a', Gem::Requirement.default + end assert_equal %w[a-10.a], available.sorted.map { |s| s.spec.full_name } @@ -83,7 +87,9 @@ class TestGemDependencyInstaller < Gem::TestCase dep = Gem::Dependency.new 'a', Gem::Requirement.default - available = inst.available_set_for dep, Gem::Requirement.default + available = Gem::Deprecate.skip_during do + inst.available_set_for dep, Gem::Requirement.default + end assert_equal %w[a-1], available.set.map { |s| s.spec.full_name } end @@ -98,7 +104,9 @@ class TestGemDependencyInstaller < Gem::TestCase dep = Gem::Dependency.new 'a', Gem::Requirement.default dep.prerelease = true - available = inst.available_set_for dep, Gem::Requirement.default + available = Gem::Deprecate.skip_during do + inst.available_set_for dep, Gem::Requirement.default + end assert_equal %w[a-10.a], available.sorted.map { |s| s.spec.full_name } @@ -984,7 +992,9 @@ class TestGemDependencyInstaller < Gem::TestCase Gem::Specification.reset - set = inst.find_gems_with_sources(dep) + set = Gem::Deprecate.skip_during do + inst.find_gems_with_sources(dep) + end assert_kind_of Gem::AvailableSet, set @@ -1002,7 +1012,9 @@ class TestGemDependencyInstaller < Gem::TestCase inst = Gem::DependencyInstaller.new - available = inst.find_spec_by_name_and_version('*.gem') + available = Gem::Deprecate.skip_during do + inst.find_spec_by_name_and_version('*.gem') + end assert_equal %w[a-1], available.each_spec.map { |spec| spec.full_name } end @@ -1013,7 +1025,9 @@ class TestGemDependencyInstaller < Gem::TestCase inst = Gem::DependencyInstaller.new assert_raises Gem::Package::FormatError do - inst.find_spec_by_name_and_version '*.gem' + Gem::Deprecate.skip_during do + inst.find_spec_by_name_and_version '*.gem' + end end end @@ -1023,7 +1037,9 @@ class TestGemDependencyInstaller < Gem::TestCase inst = Gem::DependencyInstaller.new e = assert_raises Gem::Package::FormatError do - inst.find_spec_by_name_and_version 'rdoc.gem' + Gem::Deprecate.skip_during do + inst.find_spec_by_name_and_version 'rdoc.gem' + end end full_path = File.join @tempdir, 'rdoc.gem' @@ -1036,7 +1052,9 @@ class TestGemDependencyInstaller < Gem::TestCase inst = Gem::DependencyInstaller.new e = assert_raises Gem::SpecificGemNotFoundException do - inst.find_spec_by_name_and_version 'rdoc' + Gem::Deprecate.skip_during do + inst.find_spec_by_name_and_version 'rdoc' + end end assert_equal "Could not find a valid gem 'rdoc' (>= 0) " + @@ -1050,7 +1068,9 @@ class TestGemDependencyInstaller < Gem::TestCase inst = Gem::DependencyInstaller.new e = assert_raises Gem::SpecificGemNotFoundException do - inst.find_spec_by_name_and_version 'rdoc' + Gem::Deprecate.skip_during do + inst.find_spec_by_name_and_version 'rdoc' + end end assert_equal "Could not find a valid gem 'rdoc' (>= 0) " + @@ -1067,7 +1087,9 @@ class TestGemDependencyInstaller < Gem::TestCase set = nil Dir.chdir @tempdir do - set = inst.find_gems_with_sources dep + set = Gem::Deprecate.skip_during do + inst.find_gems_with_sources dep + end end gems = set.sorted @@ -1091,16 +1113,22 @@ class TestGemDependencyInstaller < Gem::TestCase dependency = Gem::Dependency.new('a', Gem::Requirement.default) - releases = - installer.find_gems_with_sources(dependency).all_specs + set = Gem::Deprecate.skip_during do + installer.find_gems_with_sources(dependency) + end + + releases = set.all_specs assert releases.any? { |s| s.name == 'a' and s.version.to_s == '1' } refute releases.any? { |s| s.name == 'a' and s.version.to_s == '1.a' } dependency.prerelease = true - prereleases = - installer.find_gems_with_sources(dependency).all_specs + set = Gem::Deprecate.skip_during do + installer.find_gems_with_sources(dependency) + end + + prereleases = set.all_specs assert_equal [@a1_pre, @a1], prereleases end @@ -1117,8 +1145,11 @@ class TestGemDependencyInstaller < Gem::TestCase dependency = Gem::Dependency.new('a', Gem::Requirement.default) - releases = - installer.find_gems_with_sources(dependency, true).all_specs + set = Gem::Deprecate.skip_during do + installer.find_gems_with_sources(dependency, true) + end + + releases = set.all_specs assert_equal [a1_x86_mingw32], releases end @@ -1130,7 +1161,9 @@ class TestGemDependencyInstaller < Gem::TestCase dep = Gem::Dependency.new('a') - out = installer.find_gems_with_sources(dep) + out = Gem::Deprecate.skip_during do + installer.find_gems_with_sources(dep) + end assert out.empty? assert_kind_of Gem::SourceFetchProblem, installer.errors.first diff --git a/test/rubygems/test_gem_indexer.rb b/test/rubygems/test_gem_indexer.rb index 167f36f0cf..ce08702c41 100644 --- a/test/rubygems/test_gem_indexer.rb +++ b/test/rubygems/test_gem_indexer.rb @@ -306,7 +306,6 @@ class TestGemIndexer < Gem::TestCase util_remove_gem sys_gem end - def test_update_index use_ui @ui do @indexer.generate_index diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index 163867cdf1..d8b5868fd2 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -326,7 +326,7 @@ gem 'other', version @installer.generate_bin - assert_directory_exists (util_inst_bindir) + assert_directory_exists util_inst_bindir installed_exec = File.join(util_inst_bindir, 'executable') assert_path_exists installed_exec assert_equal mask, File.stat(installed_exec).mode unless win_platform? @@ -1829,10 +1829,10 @@ gem 'other', version assert_predicate spec, :default_gem? end - def test_default_gem + def test_default_gem_without_wrappers FileUtils.rm_f File.join(Gem.dir, 'specifications') - @installer.wrappers = true + @installer.wrappers = false @installer.options[:install_as_default] = true @installer.gem_dir = @spec.gem_dir @@ -1850,6 +1850,34 @@ gem 'other', version default_spec = eval File.read File.join(Gem.default_dir, 'specifications', 'default', 'a-2.gemspec') assert_equal Gem::Version.new("2"), default_spec.version assert_equal ['bin/executable'], default_spec.files + + assert_directory_exists util_inst_bindir + + installed_exec = File.join util_inst_bindir, 'executable' + assert_path_exists installed_exec + + wrapper = File.read installed_exec + refute_match %r|generated by RubyGems|, wrapper + end + + def test_default_gem_with_wrappers + FileUtils.rm_f File.join(Gem.dir, 'specifications') + + @installer.wrappers = true + @installer.options[:install_as_default] = true + @installer.gem_dir = @spec.gem_dir + + use_ui @ui do + @installer.install + end + + assert_directory_exists util_inst_bindir + + installed_exec = File.join util_inst_bindir, 'executable' + assert_path_exists installed_exec + + wrapper = File.read installed_exec + assert_match %r|generated by RubyGems|, wrapper end def test_default_gem_with_exe_as_bindir diff --git a/test/rubygems/test_gem_package.rb b/test/rubygems/test_gem_package.rb index c7a83319a0..03accc9dfe 100644 --- a/test/rubygems/test_gem_package.rb +++ b/test/rubygems/test_gem_package.rb @@ -115,7 +115,6 @@ class TestGemPackage < Gem::Package::TarTestCase spec.date = Time.at 0 spec.rubygems_version = Gem::Version.new '0' - package = Gem::Package.new spec.file_name assert_equal Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc, package.build_time diff --git a/test/rubygems/test_gem_package_tar_writer.rb b/test/rubygems/test_gem_package_tar_writer.rb index 6a940ed902..81661da45a 100644 --- a/test/rubygems/test_gem_package_tar_writer.rb +++ b/test/rubygems/test_gem_package_tar_writer.rb @@ -125,7 +125,6 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase assert_headers_equal(tar_file_header('x', '', 0644, 10, Time.now), @io.string[0, 512]) - assert_equal "aaaaaaaaaa#{"\0" * 502}", @io.string[512, 512] digest = signer.digest_algorithm.new diff --git a/test/rubygems/test_gem_request_set_lockfile_parser.rb b/test/rubygems/test_gem_request_set_lockfile_parser.rb index c07a8c2a3d..7fc93c36e5 100644 --- a/test/rubygems/test_gem_request_set_lockfile_parser.rb +++ b/test/rubygems/test_gem_request_set_lockfile_parser.rb @@ -67,7 +67,6 @@ class TestGemRequestSetLockfileParser < Gem::TestCase assert_equal File.expand_path("#{@gem_deps_file}.lock"), e.path end - def test_parse write_lockfile <<-LOCKFILE.strip GEM diff --git a/test/rubygems/test_gem_resolver.rb b/test/rubygems/test_gem_resolver.rb index 74dc647a17..4f88f83e16 100644 --- a/test/rubygems/test_gem_resolver.rb +++ b/test/rubygems/test_gem_resolver.rb @@ -676,7 +676,6 @@ class TestGemResolver < Gem::TestCase # activesupport 2.3.5, 2.3.4 # Activemerchant needs activesupport >= 2.3.2. When you require activemerchant, it will activate the latest version that meets that requirement which is 2.3.5. Actionmailer on the other hand needs activesupport = 2.3.4. When rubygems tries to activate activesupport 2.3.4, it will raise an error. - def test_simple_activesupport_problem sup1 = util_spec "activesupport", "2.3.4" sup2 = util_spec "activesupport", "2.3.5" diff --git a/test/rubygems/test_gem_resolver_installed_specification.rb b/test/rubygems/test_gem_resolver_installed_specification.rb index 2b54fbc629..e9422b75f8 100644 --- a/test/rubygems/test_gem_resolver_installed_specification.rb +++ b/test/rubygems/test_gem_resolver_installed_specification.rb @@ -45,5 +45,4 @@ class TestGemResolverInstalledSpecification < Gem::TestCase assert b_spec.installable_platform? end - end diff --git a/test/rubygems/test_gem_server.rb b/test/rubygems/test_gem_server.rb index 31ae344784..ca9ba4bf9c 100644 --- a/test/rubygems/test_gem_server.rb +++ b/test/rubygems/test_gem_server.rb @@ -358,7 +358,6 @@ class TestGemServer < Gem::TestCase assert_match 'z 9', @res.body end - def test_xss_homepage_fix_289313 data = StringIO.new "GET / HTTP/1.0\r\n\r\n" dir = "#{@gemhome}2" diff --git a/test/rubygems/test_gem_stub_specification.rb b/test/rubygems/test_gem_stub_specification.rb index 13a952d0bd..10f8c04a0e 100644 --- a/test/rubygems/test_gem_stub_specification.rb +++ b/test/rubygems/test_gem_stub_specification.rb @@ -122,7 +122,6 @@ class TestStubSpecification < Gem::TestCase end end - def test_missing_extensions_eh stub = stub_with_extension do |s| extconf_rb = File.join s.gem_dir, s.extensions.first diff --git a/test/rubygems/test_require.rb b/test/rubygems/test_require.rb index 846826c3f1..16159ef65e 100644 --- a/test/rubygems/test_require.rb +++ b/test/rubygems/test_require.rb @@ -381,7 +381,6 @@ class TestGemRequire < Gem::TestCase assert_equal %w(a-1), loaded_spec_names end - def test_require_bundler b1 = util_spec('bundler', '1', nil, "lib/bundler/setup.rb") b2a = util_spec('bundler', '2.a', nil, "lib/bundler/setup.rb") |