From f3272fe14ba89df4bcb293ee02ffe01929a5762c Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 10 Apr 2013 22:14:53 -0500 Subject: Eliminate test_bucket Most of the behavior tested here is now tested elsewhere. Move the remaining useful tests to better places. --- Library/Homebrew/test/test_cmd_cleanup.rb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Library/Homebrew/test/test_cmd_cleanup.rb (limited to 'Library/Homebrew/test/test_cmd_cleanup.rb') 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 -- cgit v1.2.3