diff options
author | The Bundler Bot <bot@bundler.io> | 2017-04-21 03:26:29 +0000 |
---|---|---|
committer | The Bundler Bot <bot@bundler.io> | 2017-04-21 03:26:29 +0000 |
commit | ec06cf0788bd1f82697a6e12748d997030bfe1ea (patch) | |
tree | 3c16ce46dbcdda106e170bcad0992449a8a2afcd /spec | |
parent | dcddaf98a7201483277b71ae1fb7904a15a0cc9f (diff) | |
parent | 40646736f95403cb5e28159a67e0872c0dea0045 (diff) | |
download | bundler-ec06cf0788bd1f82697a6e12748d997030bfe1ea.tar.gz |
Auto merge of #5588 - bundler:seg-fix-ruby-head-tests, r=segiddins
Fix exec_spec on ruby-head
Diffstat (limited to 'spec')
-rw-r--r-- | spec/commands/exec_spec.rb | 4 | ||||
-rw-r--r-- | spec/support/helpers.rb | 3 |
2 files changed, 4 insertions, 3 deletions
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 |