summaryrefslogtreecommitdiff
path: root/spec/bundler/runtime/with_unbundled_env_spec.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-23 18:44:21 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-18 13:45:35 +0900
commit4756c5f7e79642484d01a7dbca17357eb8b08ef1 (patch)
treefb0dcb131aac08b1a1545db3f51853c16ff71b88 /spec/bundler/runtime/with_unbundled_env_spec.rb
parent5a69a23afcc39a87bf808f484fa476978a9a0b4d (diff)
[bundler/bundler] Remove unnecessary rubygems monkeypatch
Instead, make sure we always load the local copy of bundler during specs, and never end up using the default copy. https://github.com/bundler/bundler/commit/ac655ffeda
Diffstat (limited to 'spec/bundler/runtime/with_unbundled_env_spec.rb')
-rw-r--r--spec/bundler/runtime/with_unbundled_env_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/bundler/runtime/with_unbundled_env_spec.rb b/spec/bundler/runtime/with_unbundled_env_spec.rb
index 30e8518043..62a9e40881 100644
--- a/spec/bundler/runtime/with_unbundled_env_spec.rb
+++ b/spec/bundler/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