aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-10-20 17:07:53 -0500
committerJack Nagel2014-10-20 17:07:53 -0500
commit975f61d9818c7be1e711d28eaa75d191470fe834 (patch)
treefcd86b4f6804fa8d0c33bc7395cd1a1402e86a3c /Library
parent6214b9821786302749edf31ecca316d8ccbe0ee1 (diff)
downloadbrew-975f61d9818c7be1e711d28eaa75d191470fe834.tar.bz2
Fix filesystem leak in keg tests
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/test_keg.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/Library/Homebrew/test/test_keg.rb b/Library/Homebrew/test/test_keg.rb
index fa7d591dc..9f4cc11fb 100644
--- a/Library/Homebrew/test/test_keg.rb
+++ b/Library/Homebrew/test/test_keg.rb
@@ -226,11 +226,17 @@ class LinkTests < Homebrew::TestCase
a.join("lib", "example2").make_symlink "example"
b.join("lib", "example2").mkpath
- Keg.new(a).link
+ a = Keg.new(a)
+ b = Keg.new(b)
+ a.link
lib = HOMEBREW_PREFIX.join("lib")
assert_equal 2, lib.children.length
- assert_raises(Keg::ConflictError) { Keg.new(b).link }
+ assert_raises(Keg::ConflictError) { b.link }
assert_equal 2, lib.children.length
+ ensure
+ a.unlink
+ a.uninstall
+ b.uninstall
end
end