summaryrefslogtreecommitdiff
path: root/spec/bundler/runtime/with_unbundled_env_spec.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-15 21:31:12 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-22 20:32:30 +0900
commitc7ebeb7eda9f7f6bbb48effe1efc026eeb64d09c (patch)
treeb516b3b5119331d4d8431b4d17f552e2c8e798fe /spec/bundler/runtime/with_unbundled_env_spec.rb
parentf4f157fc81b940c0f76a01ee266a08e6bba69b6b (diff)
Sync Bundler PR #3624
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3114
Diffstat (limited to 'spec/bundler/runtime/with_unbundled_env_spec.rb')
-rw-r--r--spec/bundler/runtime/with_unbundled_env_spec.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/bundler/runtime/with_unbundled_env_spec.rb b/spec/bundler/runtime/with_unbundled_env_spec.rb
index 81e4fcfd6e..2baa785285 100644
--- a/spec/bundler/runtime/with_unbundled_env_spec.rb
+++ b/spec/bundler/runtime/with_unbundled_env_spec.rb
@@ -39,7 +39,7 @@ RSpec.describe "Bundler.with_env helpers" do
end
end
- it "works with nested bundle exec invocations", :ruby_repo do
+ it "works with nested bundle exec invocations" do
create_file("exe.rb", <<-'RUBY')
count = ARGV.first.to_i
exit if count < 0
@@ -61,7 +61,7 @@ RSpec.describe "Bundler.with_env helpers" do
EOS
end
- it "removes variables that bundler added", :ruby_repo do
+ it "removes variables that bundler added" do
# Simulate bundler has not yet been loaded
ENV.replace(ENV.to_hash.delete_if {|k, _v| k.start_with?(Bundler::EnvironmentPreserver::BUNDLER_PREFIX) })
@@ -89,11 +89,13 @@ RSpec.describe "Bundler.with_env helpers" do
print #{modified_env}['RUBYOPT']
RUBY
ENV["RUBYOPT"] = "-W2 -rbundler/setup #{ENV["RUBYOPT"]}"
- bundle_exec_ruby! bundled_app("source.rb"), :env => { "BUNDLER_SPEC_DISABLE_DEFAULT_BUNDLER_GEM" => "true" }
+ simulate_bundler_version_when_missing_prerelease_default_gem_activation do
+ bundle_exec_ruby! bundled_app("source.rb")
+ end
expect(last_command.stdboth).not_to include("-rbundler/setup")
end
- it "should restore RUBYLIB", :ruby_repo do
+ it "should restore RUBYLIB" do
create_file("source.rb", <<-RUBY)
print #{modified_env}['RUBYLIB']
RUBY
@@ -202,7 +204,7 @@ RSpec.describe "Bundler.with_env helpers" do
RUBY
end
- it "runs system inside with_clean_env", :ruby_repo do
+ it "runs system inside with_clean_env" do
run_bundler_script({ "BUNDLE_FOO" => "bar" }, bundled_app("source.rb"))
expect($?.exitstatus).to eq(42)
end
@@ -217,7 +219,7 @@ RSpec.describe "Bundler.with_env helpers" do
RUBY
end
- it "runs system inside with_unbundled_env", :ruby_repo do
+ it "runs system inside with_unbundled_env" do
run_bundler_script({ "BUNDLE_FOO" => "bar" }, bundled_app("source.rb"))
expect($?.exitstatus).to eq(42)
end