summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-04-15 11:40:16 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-04-19 21:36:15 -0500
commitad0e888be04daafe21ba63d49fb306b7cf709be1 (patch)
tree22a503ea1d52981ec109ca21a2da978cff48d7a9
parentf153ef72f8572eee86e8b1672e29a6a206efb91a (diff)
downloadbundler-ad0e888be04daafe21ba63d49fb306b7cf709be1.tar.gz
Fix exec_spec on ruby-head
-rw-r--r--spec/commands/exec_spec.rb4
-rw-r--r--spec/support/helpers.rb3
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