diff options
author | Agis Anastasopoulos <agis.anast@gmail.com> | 2015-09-19 18:38:54 +0300 |
---|---|---|
committer | Agis Anastasopoulos <agis.anast@gmail.com> | 2015-09-19 19:12:01 +0300 |
commit | f5c6978b61826187cecb5ed66a2c21134bc5610b (patch) | |
tree | ac79d6b138128cdbe239885328ad06e38be9311b | |
parent | 298dee7185c69f33336d9c28a9e8a330b46ac8eb (diff) | |
download | bundler-f5c6978b61826187cecb5ed66a2c21134bc5610b.tar.gz |
Add test for #3982
-rw-r--r-- | spec/runtime/with_clean_env_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/runtime/with_clean_env_spec.rb b/spec/runtime/with_clean_env_spec.rb index 13dd629a16..e47e32c2cb 100644 --- a/spec/runtime/with_clean_env_spec.rb +++ b/spec/runtime/with_clean_env_spec.rb @@ -53,6 +53,15 @@ describe "Bundler.with_env helpers" do expect(Bundler::ORIGINAL_ENV["RUBYOPT"]).to eq(" -I#{lib_path} -rbundler/setup") end + it "cleans RUBYLIB" do + lib_path = File.expand_path("../../../lib", __FILE__) + Bundler::ORIGINAL_ENV["RUBYLIB"] = lib_path + + Bundler.with_clean_env do + expect(`echo $RUBYLIB`.strip).not_to include(lib_path) + end + end + it "should not change ORIGINAL_ENV" do expect(Bundler::ORIGINAL_ENV["BUNDLE_PATH"]).to eq("./Gemfile") end |