mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00

Most of the behavior tested here is now tested elsewhere. Move the remaining useful tests to better places.
28 lines
602 B
Ruby
28 lines
602 B
Ruby
require 'testing_env'
|
|
require 'test/testball'
|
|
require 'cmd/cleanup'
|
|
|
|
class CleanupTests < Test::Unit::TestCase
|
|
def test_cleanup
|
|
f1 = Class.new(TestBall) { version '0.1' }.new
|
|
f2 = Class.new(TestBall) { version '0.2' }.new
|
|
f3 = Class.new(TestBall) { version '0.3' }.new
|
|
|
|
shutup do
|
|
f1.brew { f1.install }
|
|
f2.brew { f2.install }
|
|
f3.brew { f3.install }
|
|
end
|
|
|
|
assert f1.installed?
|
|
assert f2.installed?
|
|
assert f3.installed?
|
|
|
|
shutup { Homebrew.cleanup_formula(f3) }
|
|
|
|
assert !f1.installed?
|
|
assert !f2.installed?
|
|
assert f3.installed?
|
|
end
|
|
end
|