brew/Library/Homebrew/test/test_uninstall.rb

31 lines
848 B
Ruby
Raw Normal View History

2016-09-27 00:03:40 +02:00
require "helper/integration_command_test_case"
require "cmd/uninstall"
class UninstallTests < Homebrew::TestCase
def test_check_for_testball_f2s_when_developer
refute_predicate Homebrew, :should_check_for_dependents?
end
def test_check_for_dependents_when_not_developer
run_as_not_developer do
assert_predicate Homebrew, :should_check_for_dependents?
end
end
def test_check_for_dependents_when_ignore_dependencies
ARGV << "--ignore-dependencies"
run_as_not_developer do
refute_predicate Homebrew, :should_check_for_dependents?
end
ensure
ARGV.delete("--ignore-dependencies")
end
end
2016-09-27 00:03:40 +02:00
class IntegrationCommandTestUninstall < IntegrationCommandTestCase
def test_uninstall
cmd("install", testball)
assert_match "Uninstalling testball", cmd("uninstall", "--force", testball)
2016-09-27 22:37:03 +01:00
end
end