summaryrefslogtreecommitdiff
path: root/spec/runtime/with_unbundled_env_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/runtime/with_unbundled_env_spec.rb')
-rw-r--r--spec/runtime/with_unbundled_env_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/runtime/with_unbundled_env_spec.rb b/spec/runtime/with_unbundled_env_spec.rb
index 30e8518043..62a9e40881 100644
--- a/spec/runtime/with_unbundled_env_spec.rb
+++ b/spec/runtime/with_unbundled_env_spec.rb
@@ -1,15 +1,15 @@
# frozen_string_literal: true
RSpec.describe "Bundler.with_env helpers" do
- def bundle_exec_ruby!(code)
- build_bundler_context
- bundle! "exec '#{Gem.ruby}' -e #{code}"
+ def bundle_exec_ruby!(code, options = {})
+ build_bundler_context options
+ bundle! "exec '#{Gem.ruby}' -e #{code}", options
end
- def build_bundler_context
+ def build_bundler_context(options = {})
bundle "config set path vendor/bundle"
gemfile ""
- bundle "install"
+ bundle "install", options
end
describe "Bundler.original_env" do
@@ -75,7 +75,7 @@ RSpec.describe "Bundler.with_env helpers" do
it "should remove '-rbundler/setup' from RUBYOPT" do
code = "print #{modified_env}['RUBYOPT']"
ENV["RUBYOPT"] = "-W2 -rbundler/setup #{ENV["RUBYOPT"]}"
- bundle_exec_ruby! code.dump
+ bundle_exec_ruby! code.dump, :env => { "BUNDLER_SPEC_DISABLE_DEFAULT_BUNDLER_GEM" => "true" }
expect(last_command.stdboth).not_to include("-rbundler/setup")
end