diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-12-14 21:19:28 +0900 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-12-14 15:34:48 +0100 |
commit | f8058353c2e0aaf64bd19c85e4c7081012dc7530 (patch) | |
tree | 3ca89f7ba1631632316946bbcbd6aad17960bf4b /spec/support | |
parent | 935c7272ba0f17f81823e704b54627b75cf7f913 (diff) | |
download | bundler-f8058353c2e0aaf64bd19c85e4c7081012dc7530.tar.gz |
Fixed test failures with gem command path on ruby core repo.fixed-bundler-specs-on-ruby-repo
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/path.rb | 6 | ||||
-rw-r--r-- | spec/support/rubygems_ext.rb | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/spec/support/path.rb b/spec/support/path.rb index eea3161b15..645da52c97 100644 --- a/spec/support/path.rb +++ b/spec/support/path.rb @@ -21,8 +21,12 @@ module Spec @bindir ||= root.join(ruby_core? ? "libexec" : "exe") end + def gem_cmd + @gem_cmd ||= ruby_core? ? root.join("bin/gem") : "gem" + end + def gem_bin - @gem_bin ||= ruby_core? ? ENV["GEM_COMMAND"] : "#{Gem.ruby} -S gem --backtrace" + @gem_bin ||= ruby_core? ? ENV["GEM_COMMAND"] : "gem" end def spec_dir diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb index 7e9e8328c5..ee9c750a52 100644 --- a/spec/support/rubygems_ext.rb +++ b/spec/support/rubygems_ext.rb @@ -99,7 +99,7 @@ module Spec no_reqs.map!(&:first) reqs.map! {|name, req| "'#{name}:#{req}'" } deps = reqs.concat(no_reqs).join(" ") - gem = Path.gem_bin + gem = ENV["GEM_COMMAND"] || "#{Gem.ruby} -S gem --backtrace" cmd = "#{gem} install #{deps} --no-document --conservative" system(cmd) || raise("Installing gems #{deps} for the tests to use failed!") end |