cleaner: add test to demonstrate that empty prefixes are removed

This commit is contained in:
Jack Nagel 2013-12-21 23:28:03 -06:00
parent 8430307fa5
commit f55e93d9fc

View File

@ -11,7 +11,7 @@ class CleanerTests < Test::Unit::TestCase
end
def teardown
@f.prefix.rmtree
@f.prefix.rmtree if @f.prefix.exist?
end
def test_clean_file
@ -28,6 +28,11 @@ class CleanerTests < Test::Unit::TestCase
assert_equal 0100444, (@f.lib/'i386.dylib').stat.mode
end
def test_prunes_prefix_if_empty
Cleaner.new @f
assert !@f.prefix.directory?
end
def test_prunes_empty_directories
subdir = @f.bin/'subdir'
subdir.mkpath