Finalize XDG support with proper backwards compatibility

Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-09-09 12:58:04 +00:00
parent 040fd9cd91
commit 890e7ab9a8
2 changed files with 3 additions and 2 deletions

View File

@ -29,8 +29,9 @@ RSpec.describe Homebrew::Bundle::Brewfile do
allow(ENV).to receive(:[]).with("XDG_CONFIG_HOME").and_return(nil) allow(ENV).to receive(:[]).with("XDG_CONFIG_HOME").and_return(nil)
allow(File).to receive(:exist?).with("/Users/username/.homebrew/Brewfile") allow(File).to receive(:exist?).with("/Users/username/.homebrew/Brewfile")
.and_return(config_dir_brewfile_exist) .and_return(config_dir_brewfile_exist)
# Allow any other File.exist? calls to return false by default # Allow any other File.exist? calls and Dir.home calls for flexibility
allow(File).to receive(:exist?).and_return(false) allow(File).to receive(:exist?).and_return(false)
allow(Dir).to receive(:home).and_return("/Users/username")
end end
context "when `file` is specified with a relative path" do context "when `file` is specified with a relative path" do