aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_update_report.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_update_report.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_update_report.rb')
-rw-r--r--Library/Homebrew/test/test_update_report.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/Library/Homebrew/test/test_update_report.rb b/Library/Homebrew/test/test_update_report.rb
index 35243fa1a..b7cdb454b 100644
--- a/Library/Homebrew/test/test_update_report.rb
+++ b/Library/Homebrew/test/test_update_report.rb
@@ -29,10 +29,6 @@ class ReportTests < Homebrew::TestCase
@hub = ReporterHub.new
end
- def teardown
- FileUtils.rm_rf HOMEBREW_LIBRARY.join("Taps")
- end
-
def perform_update(fixture_name = "")
Formulary.stubs(:factory).returns(stub(:pkg_version => "1.0"))
FormulaVersions.stubs(:new).returns(stub(:formula_at_revision => "2.0"))
@@ -91,6 +87,8 @@ class ReportTests < Homebrew::TestCase
perform_update("update_git_diff_output_with_restructured_tap")
assert_equal %w[foo/bar/git foo/bar/lua], @hub.select_formula(:A)
assert_empty @hub.select_formula(:D)
+ ensure
+ tap.path.parent.rmtree
end
def test_update_homebrew_simulate_homebrew_php_restructuring
@@ -101,6 +99,8 @@ class ReportTests < Homebrew::TestCase
perform_update("update_git_diff_simulate_homebrew_php_restructuring")
assert_empty @hub.select_formula(:A)
assert_equal %w[foo/bar/git foo/bar/lua], @hub.select_formula(:D)
+ ensure
+ tap.path.parent.rmtree
end
def test_update_homebrew_with_tap_formulae_changes
@@ -112,5 +112,7 @@ class ReportTests < Homebrew::TestCase
assert_equal %w[foo/bar/lua], @hub.select_formula(:A)
assert_equal %w[foo/bar/git], @hub.select_formula(:M)
assert_empty @hub.select_formula(:D)
+ ensure
+ tap.path.parent.rmtree
end
end