mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/rubygems/test_gem_commands_setup_command.rb: Allow /bin/env
Follow up of 65201c054a
This commit is contained in:
parent
53a8b1486b
commit
377c63366f
1 changed files with 5 additions and 9 deletions
|
@ -184,15 +184,11 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
|||
|
||||
ruby_exec = sprintf Gem.default_exec_format, 'ruby'
|
||||
|
||||
if Gem.win_platform?
|
||||
assert_match %r%\A#!\s*#{ruby_exec}%, File.read(default_gem_bin_path)
|
||||
assert_match %r%\A#!\s*#{ruby_exec}%, File.read(default_bundle_bin_path)
|
||||
assert_match %r%\A#!\s*#{ruby_exec}%, File.read(gem_bin_path)
|
||||
else
|
||||
assert_match %r%\A#!/usr/bin/env #{ruby_exec}%, File.read(default_gem_bin_path)
|
||||
assert_match %r%\A#!/usr/bin/env #{ruby_exec}%, File.read(default_bundle_bin_path)
|
||||
assert_match %r%\A#!/usr/bin/env #{ruby_exec}%, File.read(gem_bin_path)
|
||||
end
|
||||
bin_env = win_platform? ? "" : %w(/usr/bin/env /bin/env).find {|f| File.executable?(f) }
|
||||
|
||||
assert_match %r%\A#!#{bin_env}\s*#{ruby_exec}%, File.read(default_gem_bin_path)
|
||||
assert_match %r%\A#!#{bin_env}\s*#{ruby_exec}%, File.read(default_bundle_bin_path)
|
||||
assert_match %r%\A#!#{bin_env}\s*#{ruby_exec}%, File.read(gem_bin_path)
|
||||
end
|
||||
|
||||
def test_pem_files_in
|
||||
|
|
Loading…
Reference in a new issue