diff options
author | Marc A. Paradise <marc.paradise@gmail.com> | 2019-04-19 21:20:30 -0400 |
---|---|---|
committer | Marc A. Paradise <marc.paradise@gmail.com> | 2019-04-24 13:29:00 -0400 |
commit | 742de4bef315a56cecc016d8507369805d6c5dd2 (patch) | |
tree | 1a1081a361bf58022e7a7a16321dd5406b76d5cb | |
parent | 5724a80d9f331b67956e35c05ce5f599ce60206f (diff) | |
download | chef-742de4bef315a56cecc016d8507369805d6c5dd2.tar.gz |
Set the correct variable to test that a key is given
Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
-rw-r--r-- | spec/unit/knife/core/windows_bootstrap_context_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/knife/core/windows_bootstrap_context_spec.rb b/spec/unit/knife/core/windows_bootstrap_context_spec.rb index 80a846100a..3ab173f316 100644 --- a/spec/unit/knife/core/windows_bootstrap_context_spec.rb +++ b/spec/unit/knife/core/windows_bootstrap_context_spec.rb @@ -86,11 +86,11 @@ describe Chef::Knife::Core::WindowsBootstrapContext do describe "validation_key" do before do - bootstrap_context.instance_variable_set(:@config, Mash.new(validation_key: "C:\\chef\\key.pem")) + bootstrap_context.instance_variable_set(:@chef_config, Mash.new(validation_key: "C:\\chef\\key.pem")) end it "should return false if validation_key does not exist" do - allow(::File).to receive(:expand_path) + allow(::File).to receive(:expand_path).with("C:\\chef\\key.pem").and_call_original allow(::File).to receive(:exist?).and_return(false) expect(bootstrap_context.validation_key).to eq(false) end |