Skip to content

Commit 0b247b8

Browse files
correct mocking
Signed-off-by: Lamont Granquist <[email protected]>
1 parent d898f06 commit 0b247b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spec/unit/health_check_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,13 @@ def mkdump(base, size, x64 = false)
118118
end
119119

120120
let(:failed_list) do
121-
double("Mixlib::Shellout",
122-
error!: { raise "Mixlib::Shellout::ShellCommandFailed" }
121+
failed_list = double("Mixlib::Shellout",
123122
stdout: <<~EOH
124123
/opt/chefdk/shouldnt/matter
125124
EOH
126125
)
126+
allow(failed_list).to receive(:error!).and_raise("Mixlib::Shellout::ShellCommandFailed")
127+
failed_list
127128
end
128129

129130
let(:bad_list) do

0 commit comments

Comments
 (0)