Skip to content

Commit

Permalink
Simplify --destdir test
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Nov 5, 2021
1 parent 50a7e34 commit 0571fd1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/rubygems/test_gem_commands_setup_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,10 @@ def test_install_default_bundler_gem_with_destdir_flag

@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)
spec = Gem::Specification.load("bundler/bundler.gemspec")

spec.executables.each do |e|
assert_path_exist File.join destdir, spec.bin_dir.gsub(/^[a-zA-Z]:/, ''), e
assert_path_exist File.join destdir, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'gems', spec.full_name, spec.bindir, e
end
end
end
Expand Down

0 comments on commit 0571fd1

Please sign in to comment.