aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_uninstall.rb
diff options
context:
space:
mode:
authorMarkus Reiter2016-10-21 08:57:39 +0200
committerMarkus Reiter2016-11-16 23:52:37 +0100
commit6b6b27126d7ecc1dde9a6bc166a7e1daa3af35d2 (patch)
tree60fcf247ce650e96a0d8f5588cd1a8d79d57aeb8 /Library/Homebrew/test/test_uninstall.rb
parentedf042ee97f80955b077724119e717a51eb25e29 (diff)
downloadbrew-6b6b27126d7ecc1dde9a6bc166a7e1daa3af35d2.tar.bz2
Reorder and rename test files.
Diffstat (limited to 'Library/Homebrew/test/test_uninstall.rb')
-rw-r--r--Library/Homebrew/test/test_uninstall.rb67
1 files changed, 0 insertions, 67 deletions
diff --git a/Library/Homebrew/test/test_uninstall.rb b/Library/Homebrew/test/test_uninstall.rb
deleted file mode 100644
index d86db0e80..000000000
--- a/Library/Homebrew/test/test_uninstall.rb
+++ /dev/null
@@ -1,67 +0,0 @@
-require "helper/integration_command_test_case"
-require "cmd/uninstall"
-
-class UninstallTests < Homebrew::TestCase
- def setup
- @dependency = formula("dependency") { url "f-1" }
- @dependent = formula("dependent") do
- url "f-1"
- depends_on "dependency"
- end
-
- [@dependency, @dependent].each { |f| f.installed_prefix.mkpath }
-
- tab = Tab.empty
- tab.tabfile = @dependent.installed_prefix/Tab::FILENAME
- tab.runtime_dependencies = [
- { "full_name" => "dependency", "version" => "1" },
- ]
- tab.write
-
- stub_formula_loader @dependency
- stub_formula_loader @dependent
- end
-
- def teardown
- Homebrew.failed = false
- [@dependency, @dependent].each { |f| f.rack.rmtree }
- end
-
- def handle_unsatisfied_dependents
- capture_stderr do
- opts = { @dependency.rack => [Keg.new(@dependency.installed_prefix)] }
- Homebrew.handle_unsatisfied_dependents(opts)
- end
- end
-
- def test_check_for_testball_f2s_when_developer
- skip "Flaky test"
- assert_match "Warning", handle_unsatisfied_dependents
- refute_predicate Homebrew, :failed?
- end
-
- def test_check_for_dependents_when_not_developer
- skip "Flaky test"
- run_as_not_developer do
- assert_match "Error", handle_unsatisfied_dependents
- assert_predicate Homebrew, :failed?
- end
- end
-
- def test_check_for_dependents_when_ignore_dependencies
- ARGV << "--ignore-dependencies"
- run_as_not_developer do
- assert_empty handle_unsatisfied_dependents
- refute_predicate Homebrew, :failed?
- end
- ensure
- ARGV.delete("--ignore-dependencies")
- end
-end
-
-class IntegrationCommandTestUninstall < IntegrationCommandTestCase
- def test_uninstall
- cmd("install", testball)
- assert_match "Uninstalling testball", cmd("uninstall", "--force", testball)
- end
-end