diff options
author | Thom May <thom@may.lt> | 2017-01-17 18:13:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-17 18:13:57 +0000 |
commit | 90f0386dacab482d31b7e98ed9eff56ab7fea37e (patch) | |
tree | a8e2e236e68ca8574060800daa04322b97e002e7 /spec/unit | |
parent | 6d5af4956464a805440a2a2637fed6a6c7cfea70 (diff) | |
parent | d80b71b2bf75cf3a966d73a339794c9dd115f4bd (diff) | |
download | chef-90f0386dacab482d31b7e98ed9eff56ab7fea37e.tar.gz |
Merge pull request #5313 from juliandunn/aix_candidate_version_blindly_checks_source
Don't blindly check source on candidate_version calls.
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") |