diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-02-18 15:36:23 -0800 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-02-18 15:36:23 -0800 |
commit | 10d7548357c5cc6a8dcf75f0849109af8eb35afc (patch) | |
tree | 276be09081b86546fbfb2ad6cc421e6cb254a6f9 | |
parent | ed8f3ab254699345ca7856b39db3769b63c25b89 (diff) | |
download | chef-10d7548357c5cc6a8dcf75f0849109af8eb35afc.tar.gz |
Fix unit specs for PR #2934
-rw-r--r-- | spec/unit/provider/package/rpm_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/provider/package/rpm_spec.rb b/spec/unit/provider/package/rpm_spec.rb index cd72044998..65cd652d52 100644 --- a/spec/unit/provider/package/rpm_spec.rb +++ b/spec/unit/provider/package/rpm_spec.rb @@ -58,7 +58,7 @@ describe Chef::Provider::Package::Rpm do it "should get the source package version from rpm if provided" do expect(provider).to receive(:shell_out!).with("rpm -qp --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' /tmp/ImageMagick-c++-6.5.4.7-7.el6_5.x86_64.rpm").and_return(status) - expect(provider).to receive(:shell_out!).with("rpm -q --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' ImageMagick-c++").and_return(status) + expect(provider).to receive(:shell_out).with("rpm -q --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' ImageMagick-c++").and_return(status) provider.load_current_resource expect(provider.current_resource.package_name).to eq("ImageMagick-c++") expect(provider.new_resource.version).to eq("6.5.4.7-7.el6_5") @@ -66,7 +66,7 @@ describe Chef::Provider::Package::Rpm do it "should return the current version installed if found by rpm" do expect(provider).to receive(:shell_out!).with("rpm -qp --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' /tmp/ImageMagick-c++-6.5.4.7-7.el6_5.x86_64.rpm").and_return(status) - expect(provider).to receive(:shell_out!).with("rpm -q --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' ImageMagick-c++").and_return(status) + expect(provider).to receive(:shell_out).with("rpm -q --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' ImageMagick-c++").and_return(status) provider.load_current_resource expect(provider.current_resource.version).to eq("6.5.4.7-7.el6_5") end @@ -122,7 +122,7 @@ describe Chef::Provider::Package::Rpm do it "should not detect the package name as version when not installed" do expect(provider).to receive(:shell_out!).with("rpm -qp --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' openssh-askpass").and_return(status) - expect(provider).to receive(:shell_out!).with("rpm -q --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' openssh-askpass").and_return(status) + expect(provider).to receive(:shell_out).with("rpm -q --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' openssh-askpass").and_return(status) provider.load_current_resource expect(provider.current_resource.version).to be_nil end |