diff options
author | Colby Swandale <colby@taplaboratories.com> | 2017-08-02 22:43:51 +1000 |
---|---|---|
committer | Colby Swandale <colby@taplaboratories.com> | 2017-08-20 12:05:27 +1000 |
commit | 1451bdf8b1038fd64dee8b1c13174a5d543474b3 (patch) | |
tree | 2796493c25024a5b2e905cd3ae02f80c38444ade /spec/runtime/with_clean_env_spec.rb | |
parent | 778a11b2b78b900a0803da871a280af87556a3fc (diff) | |
download | bundler-1451bdf8b1038fd64dee8b1c13174a5d543474b3.tar.gz |
fix tests/functionality breaking with new deprecation errorseg-deprecations-hard-error-in-2
Diffstat (limited to 'spec/runtime/with_clean_env_spec.rb')
-rw-r--r-- | spec/runtime/with_clean_env_spec.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/runtime/with_clean_env_spec.rb b/spec/runtime/with_clean_env_spec.rb index 5cd9f264c2..78eebaff79 100644 --- a/spec/runtime/with_clean_env_spec.rb +++ b/spec/runtime/with_clean_env_spec.rb @@ -3,8 +3,9 @@ RSpec.describe "Bundler.with_env helpers" do describe "Bundler.original_env" do before do + bundle "config path vendor/bundle" gemfile "" - bundle "install --path vendor/bundle" + bundle "install" end it "should return the PATH present before bundle was activated" do @@ -55,10 +56,11 @@ RSpec.describe "Bundler.with_env helpers" do end end - describe "Bundler.clean_env" do + describe "Bundler.clean_env", :bundler => "< 2" do before do + bundle "config path vendor/bundle" gemfile "" - bundle "install --path vendor/bundle" + bundle "install" end it "should delete BUNDLE_PATH" do @@ -107,7 +109,7 @@ RSpec.describe "Bundler.with_env helpers" do end end - describe "Bundler.with_clean_env" do + describe "Bundler.with_clean_env", :bundler => "< 2" do it "should set ENV to clean_env in the block" do expected = Bundler.clean_env actual = Bundler.with_clean_env { ENV.to_hash } @@ -123,14 +125,14 @@ RSpec.describe "Bundler.with_env helpers" do end end - describe "Bundler.clean_system", :ruby => ">= 1.9" do + describe "Bundler.clean_system", :ruby => ">= 1.9", :bundler => "< 2" do it "runs system inside with_clean_env" do Bundler.clean_system(%(echo 'if [ "$BUNDLE_PATH" = "" ]; then exit 42; else exit 1; fi' | /bin/sh)) expect($?.exitstatus).to eq(42) end end - describe "Bundler.clean_exec", :ruby => ">= 1.9" do + describe "Bundler.clean_exec", :ruby => ">= 1.9", :bundler => "< 2" do it "runs exec inside with_clean_env" do pid = Kernel.fork do Bundler.clean_exec(%(echo 'if [ "$BUNDLE_PATH" = "" ]; then exit 42; else exit 1; fi' | /bin/sh)) |