aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorJack Nagel2013-01-19 20:45:57 -0600
committerJack Nagel2013-01-21 17:24:10 -0600
commitd06824c357a43cc2ecb5229784285cb30b037354 (patch)
treecea48844d8340b7cd9116693e9f71720b207d243 /Library/Homebrew/test
parent3d92f1c683f08120d3779eff2c02b3a48ba6a84e (diff)
downloadbrew-d06824c357a43cc2ecb5229784285cb30b037354.tar.bz2
ENV.with_build_environment
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_ENV.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_ENV.rb b/Library/Homebrew/test/test_ENV.rb
index 8e69cb6f0..1a1dd922b 100644
--- a/Library/Homebrew/test/test_ENV.rb
+++ b/Library/Homebrew/test/test_ENV.rb
@@ -26,4 +26,13 @@ class EnvironmentTests < Test::Unit::TestCase
assert_nil ENV['LD']
assert_equal ENV['OBJC'], ENV['CC']
end
+
+ def test_with_build_environment
+ before = ENV.to_hash
+ ENV.with_build_environment do
+ ENV['foo'] = 'bar'
+ end
+ assert_nil ENV['foo']
+ assert_equal before, ENV.to_hash
+ end
end