diff options
| author | Jack Nagel | 2014-07-26 20:11:53 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-26 20:11:53 -0500 |
| commit | 2b90995c3edd8dad43b31169e71618feb6486833 (patch) | |
| tree | 25dd500aff90506d20976f9944ab7d3d8af46160 /Library/Homebrew/test | |
| parent | 197a12c900bc9c034e71140390727a0c8f7b5579 (diff) | |
| download | brew-2b90995c3edd8dad43b31169e71618feb6486833.tar.bz2 | |
Only populate the report with formula paths
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/fixtures/updater_fixture.yaml | 9 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_updater.rb | 22 |
2 files changed, 15 insertions, 16 deletions
diff --git a/Library/Homebrew/test/fixtures/updater_fixture.yaml b/Library/Homebrew/test/fixtures/updater_fixture.yaml index f39f3a82b..641468c93 100644 --- a/Library/Homebrew/test/fixtures/updater_fixture.yaml +++ b/Library/Homebrew/test/fixtures/updater_fixture.yaml @@ -24,12 +24,6 @@ update_git_diff_output_with_formulae_changes: | M Library/Homebrew/utils.rb M README M bin/brew -update_git_diff_output_with_tapped_formulae_changes: | - M Library/Contributions/brew_bash_completion.sh - A Library/Taps/someuser/sometap/Formula/antiword.rb - A Library/Taps/someuser/sometap/HomebrewFormula/lua.rb - A Library/Taps/someuser/sometap/custom-formula.rb - A Library/Taps/someuser/sometap/lib/not-a-formula.rb update_git_diff_output_with_removed_formulae: | A Library/Formula/flac123.rb M Library/Formula/gdal.rb @@ -46,3 +40,6 @@ update_git_diff_output_with_changed_filetype: | D Library/Formula/libgsasl.rb M Library/Homebrew/cmd/update.rb M SUPPORTERS.md +update_git_diff_output_with_restructured_tap: | + R100 git.rb Formula/git.rb + R100 lua.rb Formula/lua.rb diff --git a/Library/Homebrew/test/test_updater.rb b/Library/Homebrew/test/test_updater.rb index 0806b3d7c..2942b42f2 100644 --- a/Library/Homebrew/test/test_updater.rb +++ b/Library/Homebrew/test/test_updater.rb @@ -85,16 +85,6 @@ class UpdaterTests < Homebrew::TestCase assert_equal %w{ antiword bash-completion ddrescue dict lua }, @report.select_formula(:A) end - def test_update_homebrew_with_tapped_formula_changes - perform_update(fixture('update_git_diff_output_with_tapped_formulae_changes')) - assert_predicate @updater, :expectations_met? - assert_equal [ - HOMEBREW_LIBRARY.join("Taps", "someuser/sometap/Formula/antiword.rb"), - HOMEBREW_LIBRARY.join("Taps", "someuser/sometap/HomebrewFormula/lua.rb"), - HOMEBREW_LIBRARY.join("Taps", "someuser/sometap/custom-formula.rb"), - ], @report.tapped_formula_for(:A) - end - def test_update_homebrew_with_removed_formulae perform_update(fixture('update_git_diff_output_with_removed_formulae')) assert_predicate @updater, :expectations_met? @@ -105,4 +95,16 @@ class UpdaterTests < Homebrew::TestCase perform_update(fixture('update_git_diff_output_with_changed_filetype')) assert_predicate @updater, :expectations_met? end + + def test_update_homebrew_with_restructured_tap + repo = HOMEBREW_LIBRARY.join("Taps", "foo", "bar") + @updater = UpdaterMock.new(repo) + repo.join("Formula").mkpath + + perform_update(fixture('update_git_diff_output_with_restructured_tap')) + + assert_predicate @updater, :expectations_met? + 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 end |
