aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_cmd_cleanup.rb
diff options
context:
space:
mode:
authorJack Nagel2013-04-10 22:14:53 -0500
committerJack Nagel2013-04-10 22:27:56 -0500
commitf3272fe14ba89df4bcb293ee02ffe01929a5762c (patch)
tree505bcc8f378a17bd12c4bec680ce051103f051b7 /Library/Homebrew/test/test_cmd_cleanup.rb
parent8a7cfb071d04cd7a993a23c921c9714246264276 (diff)
downloadhomebrew-f3272fe14ba89df4bcb293ee02ffe01929a5762c.tar.bz2
Eliminate test_bucket
Most of the behavior tested here is now tested elsewhere. Move the remaining useful tests to better places.
Diffstat (limited to 'Library/Homebrew/test/test_cmd_cleanup.rb')
-rw-r--r--Library/Homebrew/test/test_cmd_cleanup.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_cmd_cleanup.rb b/Library/Homebrew/test/test_cmd_cleanup.rb
new file mode 100644
index 000000000..c88f5645c
--- /dev/null
+++ b/Library/Homebrew/test/test_cmd_cleanup.rb
@@ -0,0 +1,27 @@
+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