aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_tap.rb
diff options
context:
space:
mode:
authorXu Cheng2016-02-26 19:43:49 +0800
committerXu Cheng2016-04-02 21:51:36 +0800
commitdeea4c82a4e64e746465cd74ea80e9afbedd9a91 (patch)
tree7bc10cf25fcec31e79af9e7ec3ee35a794cbc092 /Library/Homebrew/test/test_tap.rb
parent2bb30fc5f0ab4146190e65d017ea0ad4eac40dbf (diff)
downloadbrew-deea4c82a4e64e746465cd74ea80e9afbedd9a91.tar.bz2
fix brew tests
Fix the `brew tests` problem caused by core/formula separation.
Diffstat (limited to 'Library/Homebrew/test/test_tap.rb')
-rw-r--r--Library/Homebrew/test/test_tap.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/Library/Homebrew/test/test_tap.rb b/Library/Homebrew/test/test_tap.rb
index 18fe8709d..fa0602e94 100644
--- a/Library/Homebrew/test/test_tap.rb
+++ b/Library/Homebrew/test/test_tap.rb
@@ -55,7 +55,7 @@ class TapTest < Homebrew::TestCase
end
def teardown
- Tap::TAP_DIRECTORY.rmtree
+ @path.rmtree
end
def test_fetch
@@ -68,7 +68,7 @@ class TapTest < Homebrew::TestCase
end
def test_names
- assert_equal ["homebrew/foo"], Tap.names
+ assert_equal ["homebrew/core", "homebrew/foo"], Tap.names
end
def test_attributes
@@ -95,6 +95,8 @@ class TapTest < Homebrew::TestCase
(Tap::TAP_DIRECTORY/"someone/homebrew-no-git").mkpath
assert_nil Tap.new("someone", "no-git").issues_url
+ ensure
+ path.parent.rmtree
end
def test_files
@@ -132,6 +134,8 @@ class TapTest < Homebrew::TestCase
end
end
refute_predicate version_tap, :private?
+ ensure
+ version_tap.path.rmtree
end
def test_remote_not_git_repo
@@ -213,8 +217,8 @@ class CoreTapTest < Homebrew::TestCase
def test_attributes
assert_equal "Homebrew", @repo.user
- assert_equal "homebrew", @repo.repo
- assert_equal "Homebrew/homebrew", @repo.name
+ assert_equal "core", @repo.repo
+ assert_equal "homebrew/core", @repo.name
assert_equal [], @repo.command_files
assert_predicate @repo, :installed?
refute_predicate @repo, :pinned?