aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/fixtures/updater_fixture.yaml12
-rw-r--r--Library/Homebrew/test/test_updater.rb18
2 files changed, 30 insertions, 0 deletions
diff --git a/Library/Homebrew/test/fixtures/updater_fixture.yaml b/Library/Homebrew/test/fixtures/updater_fixture.yaml
index 641468c93..6038623e6 100644
--- a/Library/Homebrew/test/fixtures/updater_fixture.yaml
+++ b/Library/Homebrew/test/fixtures/updater_fixture.yaml
@@ -43,3 +43,15 @@ update_git_diff_output_with_changed_filetype: |
update_git_diff_output_with_restructured_tap: |
R100 git.rb Formula/git.rb
R100 lua.rb Formula/lua.rb
+update_git_diff_output_with_tap_formulae_changes: |
+ M Rakefile
+ M README.md
+ M Requirements/some_requirement.rb
+ D another_ruby_file.rb
+ A a_ruby_file.rb
+ A CONTRIBUTING.md
+ M Formula/git.rb
+ A Formula/lua.rb
+ M lib/not_a_formula.rb
+ A lib/not_a_formula2.rb
+ D lib/not_a_formula3.rb
diff --git a/Library/Homebrew/test/test_updater.rb b/Library/Homebrew/test/test_updater.rb
index 9a94f97c2..b08766ae2 100644
--- a/Library/Homebrew/test/test_updater.rb
+++ b/Library/Homebrew/test/test_updater.rb
@@ -100,4 +100,22 @@ class UpdaterTests < Homebrew::TestCase
assert_equal %w{foo/bar/git foo/bar/lua}, @report.select_formula(:A)
assert_equal %w{foo/bar/git foo/bar/lua}, @report.select_formula(:D)
end
+
+ def test_update_homebrew_with_tap_formulae_changes
+ repo = HOMEBREW_LIBRARY.join("Taps", "foo", "bar")
+ @updater = UpdaterMock.new(repo)
+ repo.join("Formula").mkpath
+
+ perform_update("update_git_diff_output_with_tap_formulae_changes")
+
+ assert_equal %w{foo/bar/lua}, @report.select_formula(:A)
+ assert_equal %w{foo/bar/git}, @report.select_formula(:M)
+ assert_empty @report.select_formula(:D)
+
+ assert_empty @report.removed_tapped_formula
+ assert_equal [repo.join("Formula", "lua.rb")],
+ @report.new_tapped_formula
+ assert_equal [repo.join("Formula", "git.rb")],
+ @report.tapped_formula_for(:M)
+ end
end