Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/bundle/whalebrew_installer: fix flaky test from missing resets #19656

Merged
merged 1 commit into from
Mar 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Library/Homebrew/test/bundle/whalebrew_installer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
end

describe ".installed_images" do
before do
described_class.reset!
Homebrew::Bundle::WhalebrewDumper.reset!
end

it "shells out" do
expect { described_class.installed_images }.not_to raise_error
end
Expand Down Expand Up @@ -55,6 +60,7 @@
context "when whalebrew is installed" do
before do
described_class.reset!
Homebrew::Bundle::WhalebrewDumper.reset!
allow(Homebrew::Bundle).to receive(:whalebrew_installed?).and_return(true)
allow(Homebrew::Bundle).to receive(:system).with("whalebrew", "install", "whalebrew/wget", verbose: false)
.and_return(true)
Expand Down
Loading