diff options
Diffstat (limited to 'spec/runtime/with_clean_env_spec.rb')
-rw-r--r-- | spec/runtime/with_clean_env_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/runtime/with_clean_env_spec.rb b/spec/runtime/with_clean_env_spec.rb new file mode 100644 index 0000000000..3894e414a9 --- /dev/null +++ b/spec/runtime/with_clean_env_spec.rb @@ -0,0 +1,15 @@ +require File.expand_path('../../spec_helper', __FILE__) + +describe "Bundler.with_clean_env" do + + it "should reset and restore the environment" do + gem_path = ENV['GEM_PATH'] + + Bundler.with_clean_env do + `echo $GEM_PATH`.strip.should_not == gem_path + end + + ENV['GEM_PATH'].should == gem_path + end + +end
\ No newline at end of file |