[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
This commit is contained in:
parent
f5a4fdae25
commit
ef6752c6c4
@ -225,22 +225,20 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
|||||||
f.puts 'echo "hello"'
|
f.puts 'echo "hello"'
|
||||||
end
|
end
|
||||||
|
|
||||||
bindir(bin_dir) do
|
@cmd.options[:force] = true
|
||||||
@cmd.options[:force] = true
|
|
||||||
|
|
||||||
@cmd.install_default_bundler_gem bin_dir
|
@cmd.install_default_bundler_gem bin_dir
|
||||||
|
|
||||||
bundler_spec = Gem::Specification.load("bundler/bundler.gemspec")
|
bundler_spec = Gem::Specification.load("bundler/bundler.gemspec")
|
||||||
default_spec_path = File.join(Gem.default_specifications_dir, "#{bundler_spec.full_name}.gemspec")
|
default_spec_path = File.join(Gem.default_specifications_dir, "#{bundler_spec.full_name}.gemspec")
|
||||||
spec = Gem::Specification.load(default_spec_path)
|
spec = Gem::Specification.load(default_spec_path)
|
||||||
|
|
||||||
spec.executables.each do |e|
|
spec.executables.each do |e|
|
||||||
if Gem.win_platform?
|
if Gem.win_platform?
|
||||||
assert_path_exist File.join(bin_dir, "#{e}.bat")
|
assert_path_exist File.join(bin_dir, "#{e}.bat")
|
||||||
end
|
|
||||||
|
|
||||||
assert_path_exist File.join bin_dir, e
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
assert_path_exist File.join bin_dir, e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -249,18 +247,16 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
|||||||
|
|
||||||
bin_dir = File.join(@gemhome, 'bin')
|
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|
|
spec.executables.each do |e|
|
||||||
assert_path_exist File.join destdir, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'gems', spec.full_name, spec.bindir, e
|
assert_path_exist File.join destdir, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'gems', spec.full_name, spec.bindir, e
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user