Clean up some things in test_bucket
This commit is contained in:
parent
c816ad70b6
commit
0497afbe57
@ -92,9 +92,7 @@ class BeerTasting < Test::Unit::TestCase
|
||||
assert f2.installed?
|
||||
assert f3.installed?
|
||||
|
||||
shutup do
|
||||
Homebrew.cleanup_formula f3
|
||||
end
|
||||
shutup { Homebrew.cleanup_formula(f3) }
|
||||
|
||||
assert !f1.installed?
|
||||
assert !f2.installed?
|
||||
@ -113,20 +111,22 @@ class BeerTasting < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_pathname_plus_yeast
|
||||
abcd = orig_abcd = HOMEBREW_CACHE+'abcd'
|
||||
|
||||
shutup do
|
||||
assert_nothing_raised do
|
||||
assert !Pathname.getwd.rmdir_if_possible
|
||||
assert !Pathname.getwd.abv.empty?
|
||||
|
||||
abcd=orig_abcd=HOMEBREW_CACHE+'abcd'
|
||||
FileUtils.cp ABS__FILE__, abcd
|
||||
installed_paths=HOMEBREW_PREFIX.install abcd
|
||||
installed_paths = HOMEBREW_PREFIX.install(abcd)
|
||||
|
||||
abcd = installed_paths[0]
|
||||
assert((HOMEBREW_PREFIX+orig_abcd.basename).exist?)
|
||||
assert abcd.exist?
|
||||
assert_equal HOMEBREW_PREFIX+'abcd', abcd
|
||||
|
||||
assert_raises(RuntimeError) { abcd.write 'CONTENT' }
|
||||
|
||||
abcd.unlink
|
||||
abcd.write 'HELLOWORLD'
|
||||
assert_equal 'HELLOWORLD', File.read(abcd)
|
||||
@ -142,10 +142,9 @@ class BeerTasting < Test::Unit::TestCase
|
||||
assert orig_abcd.exist?
|
||||
|
||||
HOMEBREW_CACHE.chmod_R 0777
|
||||
|
||||
abcd.unlink # teardown
|
||||
end
|
||||
end
|
||||
ensure
|
||||
abcd.unlink
|
||||
end
|
||||
|
||||
def test_pathname_properties
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user