Add test for reporting tap updates
This commit is contained in:
parent
908d7bdecf
commit
5b8e564d70
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user