diff options
| author | Xu Cheng | 2016-01-09 19:11:34 +0800 |
|---|---|---|
| committer | Xu Cheng | 2016-01-09 19:11:34 +0800 |
| commit | f0b22c4ce3beeb0abd242df4ab837cb533788247 (patch) | |
| tree | bd2990b8b477332b254223beb4e8402ddf42bbce /Library | |
| parent | 81dc194ebff9ca93d9d8e94190109ff2c7cc95b0 (diff) | |
| download | brew-f0b22c4ce3beeb0abd242df4ab837cb533788247.tar.bz2 | |
fix test_missing test
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/test/test_integration_cmds.rb | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb index da34f4927..8ca7b3991 100644 --- a/Library/Homebrew/test/test_integration_cmds.rb +++ b/Library/Homebrew/test/test_integration_cmds.rb @@ -190,34 +190,28 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_missing - url = "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz" - sha256 = "1dfb13ce0f6143fe675b525fc9e168adb2215c5d5965c9f57306bb993170914f" repo = CoreFormulaRepository.new foo_file = repo.formula_dir/"foo.rb" foo_file.write <<-EOS.undent class Foo < Formula - url "#{url}" - sha256 "#{sha256}" + url "https://example.com/foo-1.0" end EOS bar_file = repo.formula_dir/"bar.rb" bar_file.write <<-EOS.undent class Bar < Formula - url "#{url}" - sha256 "#{sha256}" + url "https://example.com/bar-1.0" depends_on "foo" end EOS - cmd("install", "bar") - cmd("uninstall", "foo") + (HOMEBREW_CELLAR/"bar/1.0").mkpath assert_match "foo", cmd("missing") ensure - cmd("uninstall", "--force", "foo", "bar") - cmd("cleanup", "--force", "--prune=all") - foo_file.unlink unless foo_file.nil? - bar_file.unlink unless bar_file.nil? + (HOMEBREW_CELLAR/"bar").rmtree + foo_file.unlink + bar_file.unlink end def test_doctor |
