Fix tests

This commit is contained in:
Rylan Polster 2021-04-27 20:30:23 -04:00
parent 20d05297c3
commit 49e25e6b83
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -403,10 +403,13 @@ describe Homebrew::Completions do
it "returns appropriate completion for a command with multiple named arg types" do
completion = described_class.generate_fish_subcommand_completion("upgrade")
expected_line_start = "__fish_brew_complete_arg 'upgrade; and not __fish_seen_argument"
expect(completion).to match(
/__fish_brew_complete_arg 'upgrade' -a '\(__fish_brew_suggest_formulae_outdated\)'/,
/#{expected_line_start} -l cask -l casks' -a '\(__fish_brew_suggest_formulae_outdated\)'/,
)
expect(completion).to match(
/#{expected_line_start} -l formula -l formulae' -a '\(__fish_brew_suggest_casks_outdated\)'/,
)
expect(completion).to match(/__fish_brew_complete_arg 'upgrade' -a '\(__fish_brew_suggest_casks_outdated\)'/)
end
end