summaryrefslogtreecommitdiff
path: root/spec/unit/provider/package/zypper_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/zypper_spec.rb
parentb5c9c6afdfd83fe3f1bf4c991daffeff94b49750 (diff)
downloadchef-b19b7d000887209f9d8dc1dc6aa468a0497a7391.tar.gz
s/stub!/stub/g
fix deprecation warnings
Diffstat (limited to 'spec/unit/provider/package/zypper_spec.rb')
-rw-r--r--spec/unit/provider/package/zypper_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/unit/provider/package/zypper_spec.rb b/spec/unit/provider/package/zypper_spec.rb
index cf0193993d..63f235a05c 100644
--- a/spec/unit/provider/package/zypper_spec.rb
+++ b/spec/unit/provider/package/zypper_spec.rb
@@ -30,12 +30,12 @@ describe Chef::Provider::Package::Zypper do
@status = mock("Status", :exitstatus => 0)
@provider = Chef::Provider::Package::Zypper.new(@new_resource, @run_context)
- Chef::Resource::Package.stub!(:new).and_return(@current_resource)
- @provider.stub!(:popen4).and_return(@status)
+ Chef::Resource::Package.stub(:new).and_return(@current_resource)
+ @provider.stub(:popen4).and_return(@status)
@stderr = StringIO.new
@stdout = StringIO.new
@pid = mock("PID")
- @provider.stub!(:`).and_return("2.0")
+ @provider.stub(:`).and_return("2.0")
end
describe "when loading the current package state" do
@@ -55,14 +55,14 @@ describe Chef::Provider::Package::Zypper do
end
it "should set the installed version to nil on the current resource if zypper info installed version is (none)" do
- @provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
+ @provider.stub(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
@current_resource.should_receive(:version).with(nil).and_return(true)
@provider.load_current_resource
end
it "should set the installed version if zypper info has one" do
@stdout = StringIO.new("Version: 1.0\nInstalled: Yes\n")
- @provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
+ @provider.stub(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
@current_resource.should_receive(:version).with("1.0").and_return(true)
@provider.load_current_resource
end
@@ -70,7 +70,7 @@ describe Chef::Provider::Package::Zypper do
it "should set the candidate version if zypper info has one" do
@stdout = StringIO.new("Version: 1.0\nInstalled: No\nStatus: out-of-date (version 0.9 installed)")
- @provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
+ @provider.stub(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
@provider.load_current_resource
@provider.candidate_version.should eql("1.0")
end
@@ -191,7 +191,7 @@ describe Chef::Provider::Package::Zypper do
describe "on an older zypper" do
before(:each) do
- @provider.stub!(:`).and_return("0.11.6")
+ @provider.stub(:`).and_return("0.11.6")
end
describe "install_package" do