diff --git a/Library/Homebrew/test/cmd/upgrade_spec.rb b/Library/Homebrew/test/cmd/upgrade_spec.rb index 1fc6f65c4d..436b513cb7 100644 --- a/Library/Homebrew/test/cmd/upgrade_spec.rb +++ b/Library/Homebrew/test/cmd/upgrade_spec.rb @@ -54,8 +54,7 @@ RSpec.describe Homebrew::Cmd::UpgradeCmd do expect do brew "upgrade", "--ask" - end.to output(/.*Formulae\s*\(3\):\s*(?:testball|testball5|testball4)\s*,?\s*(?:testball|testball5|testball4)\s*,? -\s*(?:testball|testball5|testball4).*/) + end.to output(/Formulae\s*\(3\):\s*(testball|testball5|testball4)\s*,\s*(?!(\1))(testball|testball5|testball4)\s*,\s*(?!(\1|\3))(testball|testball5|testball4)/) .to_stdout.and not_to_output.to_stderr expect(HOMEBREW_CELLAR/"testball/0.1").to be_a_directory