summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-11-05 13:46:32 +0100
committergit <svn-admin@ruby-lang.org>2021-11-05 23:20:49 +0900
commitef6752c6c40579205c5876b5a2de82c35874c5d5 (patch)
tree4156dc7f521459ee8a5a9b46828b81aff80bcda8 /test
parentf5a4fdae251901d07cc043918c329b797b2ed094 (diff)
[rubygems/rubygems] Remove unnecessary test setup
The method being unit tested here doesn't use `RbConfig::CONFIG["bindir"]`. https://github.com/rubygems/rubygems/commit/d3f092ad14
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb36
1 files changed, 16 insertions, 20 deletions
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index 9ce162b123..b712c8a2a7 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -225,22 +225,20 @@ class TestGemCommandsSetupCommand < Gem::TestCase
f.puts 'echo "hello"'
end
- bindir(bin_dir) do
- @cmd.options[:force] = true
+ @cmd.options[:force] = true
- @cmd.install_default_bundler_gem bin_dir
-
- bundler_spec = Gem::Specification.load("bundler/bundler.gemspec")
- default_spec_path = File.join(Gem.default_specifications_dir, "#{bundler_spec.full_name}.gemspec")
- spec = Gem::Specification.load(default_spec_path)
+ @cmd.install_default_bundler_gem bin_dir
- spec.executables.each do |e|
- if Gem.win_platform?
- assert_path_exist File.join(bin_dir, "#{e}.bat")
- end
+ bundler_spec = Gem::Specification.load("bundler/bundler.gemspec")
+ default_spec_path = File.join(Gem.default_specifications_dir, "#{bundler_spec.full_name}.gemspec")
+ spec = Gem::Specification.load(default_spec_path)
- assert_path_exist File.join bin_dir, e
+ spec.executables.each do |e|
+ if Gem.win_platform?
+ assert_path_exist File.join(bin_dir, "#{e}.bat")
end
+
+ assert_path_exist File.join bin_dir, e
end
end
@@ -249,18 +247,16 @@ class TestGemCommandsSetupCommand < Gem::TestCase
bin_dir = File.join(@gemhome, 'bin')
- bindir(bin_dir) do
- destdir = File.join(@tempdir, 'foo')
+ destdir = File.join(@tempdir, 'foo')
- @cmd.options[:destdir] = destdir
+ @cmd.options[:destdir] = destdir
- @cmd.install_default_bundler_gem bin_dir
+ @cmd.install_default_bundler_gem bin_dir
- spec = Gem::Specification.load("bundler/bundler.gemspec")
+ spec = Gem::Specification.load("bundler/bundler.gemspec")
- spec.executables.each do |e|
- assert_path_exist File.join destdir, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'gems', spec.full_name, spec.bindir, e
- end
+ spec.executables.each do |e|
+ assert_path_exist File.join destdir, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'gems', spec.full_name, spec.bindir, e
end
end