diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-08 07:14:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-08 07:14:52 +0000 |
commit | 7410e17f074977456cc609063dc340ba688d8cca (patch) | |
tree | 654dd3d7c33850d39a30fd221fb3ce7bff1132eb /test/rubygems | |
parent | 4695019a1cb71288462edf3fdb9c4dac2958a324 (diff) | |
download | ruby-7410e17f074977456cc609063dc340ba688d8cca.tar.gz |
test_gem_commands_setup_command.rb: BUNDLER_VERS
* test/rubygems/test_gem_commands_setup_command.rb: run bundled
gem command, instead of installed one.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems')
-rw-r--r-- | test/rubygems/test_gem_commands_setup_command.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb index 9fdf428501..f5388a0db2 100644 --- a/test/rubygems/test_gem_commands_setup_command.rb +++ b/test/rubygems/test_gem_commands_setup_command.rb @@ -6,7 +6,9 @@ require 'rubygems/commands/setup_command' class TestGemCommandsSetupCommand < Gem::TestCase - BUNDLER_VERS = `gem list -e bundler`[/([^() ]+)\)\Z/, 1] || "1.16.1" + gem = File.exist?(gem = File.expand_path("bin/gem", @@project_dir)) ? + [ENV["RUBY"] || "ruby", gem] : ["gem"] + BUNDLER_VERS = IO.popen(gem + %w[list -e bundler], &:read)[/([^() ]+)\)\Z/, 1] || "1.16.1" def setup super |