diff options
author | Julian C. Dunn <jdunn@chef.io> | 2016-09-12 22:23:40 -0400 |
---|---|---|
committer | Julian C. Dunn <jdunn@chef.io> | 2016-12-05 21:31:34 -0800 |
commit | d80b71b2bf75cf3a966d73a339794c9dd115f4bd (patch) | |
tree | 8f1831cbe963d1c8eac8353defb84cdcdf128e5c /spec/unit | |
parent | ed93e0fb1644643cb0d064776b3283401dfba9a7 (diff) | |
download | chef-d80b71b2bf75cf3a966d73a339794c9dd115f4bd.tar.gz |
Don't blindly check source on candidate_version calls.
Signed-off-by: Julian C. Dunn <jdunn@chef.io>
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/provider/package/aix_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/provider/package/aix_spec.rb b/spec/unit/provider/package/aix_spec.rb index 2b574bb7df..dba56b186d 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) - allow(::File).to receive(:exists?).and_return(true) + allow(::File).to receive(:exists?).with(@new_resource.source).and_return(true) end describe "assessing the current package status" do @@ -57,7 +57,7 @@ describe Chef::Provider::Package::Aix do it "should raise an exception if a source is supplied but not found" do allow(@provider).to receive(:shell_out).and_return(@empty_status) - allow(::File).to receive(:exists?).and_return(false) + allow(::File).to receive(:exists?).with(@new_resource.source).and_return(false) @provider.load_current_resource @provider.define_resource_requirements expect { @provider.process_resource_requirements }.to raise_error(Chef::Exceptions::Package) @@ -154,7 +154,7 @@ describe Chef::Provider::Package::Aix do @provider.install_package("samba.base", "3.3.12.0") end - it "should run when the package is a path to install" do + it "should run installp -aYF -d when the package is a path to install" do @new_resource = Chef::Resource::Package.new("/tmp/samba.base") @provider = Chef::Provider::Package::Aix.new(@new_resource, @run_context) expect(@new_resource.source).to eq("/tmp/samba.base") |