diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2014-12-12 13:59:44 -0800 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2014-12-14 19:53:43 -0800 |
commit | 02ff327ae6d6abcf1e618e5fd82b381a6865c13d (patch) | |
tree | f4da65335f5fb1318c0da9b5581f4e0f2a41f2ab /spec/unit/provider/package | |
parent | 4d80a325cb88da197d09b9af2ae2a1bb8ca99e9b (diff) | |
download | chef-02ff327ae6d6abcf1e618e5fd82b381a6865c13d.tar.gz |
Add specs for windows msi_specjdm/win-package-specs
Diffstat (limited to 'spec/unit/provider/package')
-rw-r--r-- | spec/unit/provider/package/windows/msi_spec.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/unit/provider/package/windows/msi_spec.rb b/spec/unit/provider/package/windows/msi_spec.rb index 44a652233d..30a695495b 100644 --- a/spec/unit/provider/package/windows/msi_spec.rb +++ b/spec/unit/provider/package/windows/msi_spec.rb @@ -30,6 +30,10 @@ describe Chef::Provider::Package::Windows::MSI do allow(::File).to receive(:absolute_path).with("calculator.msi").and_return("calculator.msi") end + it "responds to shell_out!" do + expect(provider).to respond_to(:shell_out!) + end + describe "expand_options" do it "returns an empty string if passed no options" do expect(provider.expand_options(nil)).to eql "" @@ -56,10 +60,16 @@ describe Chef::Provider::Package::Windows::MSI do end describe "install_package" do - # calls shell_out! + it "calls shell_out!" do + expect(provider).to receive(:shell_out!).with(/msiexec \/qn \/i \"calculator.msi\"/, kind_of(Hash)) + provider.install_package("unused", "unused") + end end describe "remove_package" do - # calls shell_out! + it "calls shell_out!" do + expect(provider).to receive(:shell_out!).with(/msiexec \/qn \/x \"calculator.msi\"/, kind_of(Hash)) + provider.remove_package("unused", "unused") + end end end |