diff options
Diffstat (limited to 'spec/unit/provider/package/paludis_spec.rb')
-rw-r--r-- | spec/unit/provider/package/paludis_spec.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/unit/provider/package/paludis_spec.rb b/spec/unit/provider/package/paludis_spec.rb index fe3f5f61d7..5481a33c0d 100644 --- a/spec/unit/provider/package/paludis_spec.rb +++ b/spec/unit/provider/package/paludis_spec.rb @@ -47,19 +47,19 @@ PKG_STATUS context "when loading current resource" do it "should create a current resource with the name of the new_resource" do - expect(@provider).to receive(:shell_out!).and_return(@shell_out) + expect(@provider).to receive(:shell_out_compacted!).and_return(@shell_out) expect(Chef::Resource::Package).to receive(:new).and_return(@current_resource) @provider.load_current_resource end it "should set the current resources package name to the new resources package name" do - expect(@provider).to receive(:shell_out!).and_return(@shell_out) + expect(@provider).to receive(:shell_out_compacted!).and_return(@shell_out) expect(@current_resource).to receive(:package_name).with(@new_resource.package_name) @provider.load_current_resource end it "should run pkg info with the package name" do - expect(@provider).to receive(:shell_out!).with("cave", "-L", "warning", "print-ids", "-M", "none", "-m", @new_resource.package_name, "-f", "%c/%p %v %r\n", timeout: 900).and_return(@shell_out) + expect(@provider).to receive(:shell_out_compacted!).with("cave", "-L", "warning", "print-ids", "-M", "none", "-m", @new_resource.package_name, "-f", "%c/%p %v %r\n", timeout: 900).and_return(@shell_out) @provider.load_current_resource end @@ -72,26 +72,26 @@ user/ntp 0 accounts user/ntp 0 installed-accounts net/ntp 4.2.6_p5-r1 installed INSTALLED - expect(@provider).to receive(:shell_out!).and_return(@shell_out) + expect(@provider).to receive(:shell_out_compacted!).and_return(@shell_out) @provider.load_current_resource expect(@current_resource.version).to eq("4.2.6_p5-r1") expect(@provider.candidate_version).to eql("4.2.6_p5-r2") end it "should return the current resource" do - expect(@provider).to receive(:shell_out!).and_return(@shell_out) + expect(@provider).to receive(:shell_out_compacted!).and_return(@shell_out) expect(@provider.load_current_resource).to eql(@current_resource) end end context "when installing a package" do it "should run pkg install with the package name and version" do - expect(@provider).to receive(:shell_out!).with("cave", "-L", "warning", "resolve", "-x", "=net/ntp-4.2.6_p5-r2", { :timeout => @new_resource.timeout || 900 }) + expect(@provider).to receive(:shell_out_compacted!).with("cave", "-L", "warning", "resolve", "-x", "=net/ntp-4.2.6_p5-r2", { :timeout => @new_resource.timeout || 900 }) @provider.install_package("net/ntp", "4.2.6_p5-r2") end it "should run pkg install with the package name and version and options if specified" do - expect(@provider).to receive(:shell_out!).with("cave", "-L", "warning", "resolve", "-x", "--preserve-world", "=net/ntp-4.2.6_p5-r2", { :timeout => @new_resource.timeout || 900 }) + expect(@provider).to receive(:shell_out_compacted!).with("cave", "-L", "warning", "resolve", "-x", "--preserve-world", "=net/ntp-4.2.6_p5-r2", { :timeout => @new_resource.timeout || 900 }) @new_resource.options "--preserve-world" @provider.install_package("net/ntp", "4.2.6_p5-r2") end @@ -101,7 +101,7 @@ INSTALLED sys-process/lsof 4.87 arbor sys-process/lsof 4.87 x86_64 PKG_STATUS - expect(@provider).to receive(:shell_out!).with("cave", "-L", "warning", "resolve", "-x", "=sys-process/lsof-4.87", { :timeout => @new_resource.timeout || 900 }) + expect(@provider).to receive(:shell_out_compacted!).with("cave", "-L", "warning", "resolve", "-x", "=sys-process/lsof-4.87", { :timeout => @new_resource.timeout || 900 }) @provider.install_package("sys-process/lsof", "4.87") end @@ -110,7 +110,7 @@ PKG_STATUS sys-process/lsof 4.87 arbor sys-process/lsof 4.87 x86_64 PKG_STATUS - expect(@provider).to receive(:shell_out!).and_return(@shell_out) + expect(@provider).to receive(:shell_out_compacted!).and_return(@shell_out) @provider.load_current_resource expect(@current_resource.version).to be_nil expect(@provider.candidate_version).to eql("4.87") @@ -119,14 +119,14 @@ PKG_STATUS context "when upgrading a package" do it "should run pkg install with the package name and version" do - expect(@provider).to receive(:shell_out!).with("cave", "-L", "warning", "resolve", "-x", "=net/ntp-4.2.6_p5-r2", { :timeout => @new_resource.timeout || 900 }) + expect(@provider).to receive(:shell_out_compacted!).with("cave", "-L", "warning", "resolve", "-x", "=net/ntp-4.2.6_p5-r2", { :timeout => @new_resource.timeout || 900 }) @provider.upgrade_package("net/ntp", "4.2.6_p5-r2") end end context "when uninstalling a package" do it "should run pkg uninstall with the package name and version" do - expect(@provider).to receive(:shell_out!).with("cave", "-L", "warning", "uninstall", "-x", "=net/ntp-4.2.6_p5-r2", timeout: 900) + expect(@provider).to receive(:shell_out_compacted!).with("cave", "-L", "warning", "uninstall", "-x", "=net/ntp-4.2.6_p5-r2", timeout: 900) @provider.remove_package("net/ntp", "4.2.6_p5-r2") end |