Fix filesystem leak in keg tests
This commit is contained in:
		
							parent
							
								
									6214b98217
								
							
						
					
					
						commit
						975f61d981
					
				| @ -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 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jack Nagel
						Jack Nagel