diff options
author | The Bundler Bot <bot@bundler.io> | 2017-04-21 03:26:29 +0000 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-04-30 18:34:43 -0500 |
commit | 3f255de1f44e6e8a290df3019bbc69b4a720a069 (patch) | |
tree | 0ce4ded3299cedd50710e317bc0109c24bccaaee | |
parent | f22a3dabfce751a0edb1089a89c853ca589b2265 (diff) | |
download | bundler-3f255de1f44e6e8a290df3019bbc69b4a720a069.tar.gz |
Auto merge of #5588 - bundler:seg-fix-ruby-head-tests, r=segiddins
Fix exec_spec on ruby-head
(cherry picked from commit ec06cf0788bd1f82697a6e12748d997030bfe1ea)
-rw-r--r-- | Rakefile | 2 | ||||
-rw-r--r-- | spec/commands/exec_spec.rb | 4 | ||||
-rw-r--r-- | spec/support/helpers.rb | 3 |
3 files changed, 5 insertions, 4 deletions
@@ -70,7 +70,7 @@ namespace :spec do sh "sudo apt-get install graphviz -y 2>&1 | tail -n 2" # Install the gems with a consistent version of RubyGems - sh "gem update --system 2.6.4" + sh "gem update --system 2.6.11" $LOAD_PATH.unshift("./spec") require "support/rubygems_ext" diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb index 93648bca20..d70fc636c6 100644 --- a/spec/commands/exec_spec.rb +++ b/spec/commands/exec_spec.rb @@ -718,6 +718,7 @@ __FILE__: #{path.to_s.inspect} #!/usr/bin/env ruby require "openssl" puts OpenSSL::VERSION + warn Gem.loaded_specs.values.map(&:full_name) RB file.chmod(0o777) @@ -725,10 +726,11 @@ __FILE__: #{path.to_s.inspect} expect(bundle!("exec #{file}", :system_bundler => true, :artifice => nil)).to eq(expected) expect(bundle!("exec bundle exec #{file}", :system_bundler => true, :artifice => nil)).to eq(expected) expect(bundle!("exec ruby #{file}", :system_bundler => true, :artifice => nil)).to eq(expected) + expect(run!(file.read, :no_lib => true, :artifice => nil)).to eq(expected) end # sanity check that we get the newer, custom version without bundler - sys_exec(file.to_s) + sys_exec("#{Gem.ruby} #{file}") expect(err).to include("custom openssl should not be loaded") end end diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index 1b2769ebf8..800ea82c03 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -52,10 +52,9 @@ module Spec def run(cmd, *args) opts = args.last.is_a?(Hash) ? args.pop : {} - env = opts.delete(:env) groups = args.map(&:inspect).join(", ") setup = "require 'rubygems' ; require 'bundler' ; Bundler.setup(#{groups})\n" - @out = ruby(setup + cmd, :env => env) + @out = ruby(setup + cmd, opts) end bang :run |