Skip to content
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
8 changes: 8 additions & 0 deletions spec/unit/knife/core/windows_bootstrap_context_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
let(:chef_config) { Chef::Config.save } # "dup" to a hash
let(:bootstrap_context) { Chef::Knife::Core::WindowsBootstrapContext.new(config, nil, chef_config, nil) }

before do
# Stub path methods to return consistent values across all platforms.
# On actual Windows (e.g. windows-2025 CI), these methods may resolve
# to a different drive letter based on the gem installation path.
allow(ChefConfig::Config).to receive(:etc_chef_dir).with(windows: true).and_return("C:\\chef")
allow(ChefConfig::Config).to receive(:c_opscode_dir).and_return("C:\\opscode\\chef")
end

describe "fips" do
context "when fips is set" do
before do
Expand Down
Loading