diff options
author | NimishaS <nimisha.sharad@msystechnologies.com> | 2016-11-18 14:03:34 +0000 |
---|---|---|
committer | NimishaS <nimisha.sharad@msystechnologies.com> | 2016-11-23 13:16:02 +0000 |
commit | ae19ad32028f77c14fae16869a63fc19d2d515d2 (patch) | |
tree | 53eef87e83e10d77b46a2fa580eed2534decb07e /spec/unit/provider/package/msu_spec.rb | |
parent | 0dceab39ad9d6411647c0f14de841091055848d0 (diff) | |
download | chef-ae19ad32028f77c14fae16869a63fc19d2d515d2.tar.gz |
Using shell_out_with_timeout! to throw exception if the command fails.
Hardcoded expand.exe path to avoid hitting gnu expand
Signed-off-by: NimishaS <nimisha.sharad@msystechnologies.com>
Diffstat (limited to 'spec/unit/provider/package/msu_spec.rb')
-rw-r--r-- | spec/unit/provider/package/msu_spec.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/unit/provider/package/msu_spec.rb b/spec/unit/provider/package/msu_spec.rb index d9b97aaee6..26cde5bd5f 100644 --- a/spec/unit/provider/package/msu_spec.rb +++ b/spec/unit/provider/package/msu_spec.rb @@ -243,8 +243,7 @@ The operation completed successfully. describe "#extract_msu_contents" do it "extracts the msu contents by using mixlib shellout" do - expect(Mixlib::ShellOut).to receive(:new).with("expand -f:* msu_file destination", { :timeout => new_resource.timeout }) - expect(provider).to receive(:with_os_architecture) + expect(provider).to receive(:shell_out_with_timeout!).with("#{ENV['SYSTEMROOT']}\\system32\\expand.exe -f:* msu_file destination") provider.extract_msu_contents("msu_file", "destination") end end |