summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-09-03 14:35:59 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2014-09-08 11:10:07 -0700
commitac080bb63f13d5a340e40e65183474079050a029 (patch)
tree801a514273571b0c54a5e8895ea54cb81eb7ec05
parent52ef1d5017b730314e3e7ad2f77871a52e848f65 (diff)
downloadchef-ac080bb63f13d5a340e40e65183474079050a029.tar.gz
spec fixes for aix package provider
-rw-r--r--spec/unit/provider/package/aix_spec.rb22
1 files changed, 5 insertions, 17 deletions
diff --git a/spec/unit/provider/package/aix_spec.rb b/spec/unit/provider/package/aix_spec.rb
index 35f85b628f..5d6e23302f 100644
--- a/spec/unit/provider/package/aix_spec.rb
+++ b/spec/unit/provider/package/aix_spec.rb
@@ -59,7 +59,6 @@ describe Chef::Provider::Package::Aix do
lambda { @provider.process_resource_requirements }.should raise_error(Chef::Exceptions::Package)
end
-
it "should get the source package version from lslpp if provided" do
@stdout = StringIO.new(@bffinfo)
@stdin, @stderr = StringIO.new, StringIO.new
@@ -125,9 +124,7 @@ describe Chef::Provider::Package::Aix do
describe "install and upgrade" do
it "should run installp -aYF -d with the package source to install" do
- @provider.should_receive(:run_command_with_systems_locale).with({
- :command => "installp -aYF -d /tmp/samba.base samba.base"
- })
+ @provider.should_receive(:shell_out!).with("installp -aYF -d /tmp/samba.base samba.base")
@provider.install_package("samba.base", "3.3.12.0")
end
@@ -135,37 +132,28 @@ describe Chef::Provider::Package::Aix do
@new_resource = Chef::Resource::Package.new("/tmp/samba.base")
@provider = Chef::Provider::Package::Aix.new(@new_resource, @run_context)
@new_resource.source.should == "/tmp/samba.base"
- @provider.should_receive(:run_command_with_systems_locale).with({
- :command => "installp -aYF -d /tmp/samba.base /tmp/samba.base"
- })
+ @provider.should_receive(:shell_out!).with("installp -aYF -d /tmp/samba.base /tmp/samba.base")
@provider.install_package("/tmp/samba.base", "3.3.12.0")
end
it "should run installp with -eLogfile option." do
@new_resource.stub(:options).and_return("-e/tmp/installp.log")
- @provider.should_receive(:run_command_with_systems_locale).with({
- :command => "installp -aYF -e/tmp/installp.log -d /tmp/samba.base samba.base"
- })
+ @provider.should_receive(:shell_out!).with("installp -aYF -e/tmp/installp.log -d /tmp/samba.base samba.base")
@provider.install_package("samba.base", "3.3.12.0")
end
end
describe "remove" do
it "should run installp -u samba.base to remove the package" do
- @provider.should_receive(:run_command_with_systems_locale).with({
- :command => "installp -u samba.base"
- })
+ @provider.should_receive(:shell_out!).with("installp -u samba.base")
@provider.remove_package("samba.base", "3.3.12.0")
end
it "should run installp -u -e/tmp/installp.log with options -e/tmp/installp.log" do
@new_resource.stub(:options).and_return("-e/tmp/installp.log")
- @provider.should_receive(:run_command_with_systems_locale).with({
- :command => "installp -u -e/tmp/installp.log samba.base"
- })
+ @provider.should_receive(:shell_out!).with("installp -u -e/tmp/installp.log samba.base")
@provider.remove_package("samba.base", "3.3.12.0")
end
end
end
-