summaryrefslogtreecommitdiff
path: root/spec/unit/provider/package/aix_spec.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-01-29 14:17:47 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2014-01-29 14:17:47 -0800
commitb19b7d000887209f9d8dc1dc6aa468a0497a7391 (patch)
tree68d1eb6c136df20c2800f1dddb4e2c1ed5d75a42 /spec/unit/provider/package/aix_spec.rb
parentb5c9c6afdfd83fe3f1bf4c991daffeff94b49750 (diff)
downloadchef-b19b7d000887209f9d8dc1dc6aa468a0497a7391.tar.gz
s/stub!/stub/g
fix deprecation warnings
Diffstat (limited to 'spec/unit/provider/package/aix_spec.rb')
-rw-r--r--spec/unit/provider/package/aix_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/unit/provider/package/aix_spec.rb b/spec/unit/provider/package/aix_spec.rb
index 6e936156a0..83f4763664 100644
--- a/spec/unit/provider/package/aix_spec.rb
+++ b/spec/unit/provider/package/aix_spec.rb
@@ -28,7 +28,7 @@ describe Chef::Provider::Package::Aix do
@new_resource.source("/tmp/samba.base")
@provider = Chef::Provider::Package::Aix.new(@new_resource, @run_context)
- ::File.stub!(:exists?).and_return(true)
+ ::File.stub(:exists?).and_return(true)
end
describe "assessing the current package status" do
@@ -40,20 +40,20 @@ describe Chef::Provider::Package::Aix do
end
it "should create a current resource with the name of new_resource" do
- @provider.stub!(:popen4).and_return(@status)
+ @provider.stub(:popen4).and_return(@status)
@provider.load_current_resource
@provider.current_resource.name.should == "samba.base"
end
it "should set the current resource bff package name to the new resource bff package name" do
- @provider.stub!(:popen4).and_return(@status)
+ @provider.stub(:popen4).and_return(@status)
@provider.load_current_resource
@provider.current_resource.package_name.should == "samba.base"
end
it "should raise an exception if a source is supplied but not found" do
- @provider.stub!(:popen4).and_return(@status)
- ::File.stub!(:exists?).and_return(false)
+ @provider.stub(:popen4).and_return(@status)
+ ::File.stub(:exists?).and_return(false)
@provider.define_resource_requirements
@provider.load_current_resource
lambda { @provider.process_resource_requirements }.should raise_error(Chef::Exceptions::Package)
@@ -83,13 +83,13 @@ describe Chef::Provider::Package::Aix do
it "should raise an exception if the source is not set but we are installing" do
@new_resource = Chef::Resource::Package.new("samba.base")
@provider = Chef::Provider::Package::Aix.new(@new_resource, @run_context)
- @provider.stub!(:popen4).and_return(@status)
+ @provider.stub(:popen4).and_return(@status)
lambda { @provider.run_action(:install) }.should raise_error(Chef::Exceptions::Package)
end
it "should raise an exception if installp/lslpp fails to run" do
@status = mock("Status", :exitstatus => -1)
- @provider.stub!(:popen4).and_return(@status)
+ @provider.stub(:popen4).and_return(@status)
lambda { @provider.load_current_resource }.should raise_error(Chef::Exceptions::Package)
end
@@ -117,7 +117,7 @@ describe Chef::Provider::Package::Aix do
it "should throw and exception if the exitstatus is not 0" do
@status = mock("Status", :exitstatus => 1)
- @provider.stub!(:popen4).and_return(@status)
+ @provider.stub(:popen4).and_return(@status)
lambda { @provider.candidate_version }.should raise_error(Chef::Exceptions::Package)
end
@@ -142,7 +142,7 @@ describe Chef::Provider::Package::Aix do
end
it "should run installp with -eLogfile option." do
- @new_resource.stub!(:options).and_return("-e/tmp/installp.log")
+ @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"
})
@@ -159,7 +159,7 @@ describe Chef::Provider::Package::Aix do
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")
+ @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"
})