summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-12-16 10:27:26 -0800
committerJohn Keiser <john@johnkeiser.com>2015-12-16 10:27:26 -0800
commited8f4dc8e40ed0f71ab4f90b9bce91197cce1b9f (patch)
tree835d4be75ac85186114861a3ee45a0161719a65f
parentb743fcdbd172862386d172b42bbbc31cfe2f4239 (diff)
downloadchef-jk/fix-package-nil-warning.tar.gz
Fix failing package unit testjk/fix-package-nil-warning
-rw-r--r--spec/unit/provider/package/easy_install_spec.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/spec/unit/provider/package/easy_install_spec.rb b/spec/unit/provider/package/easy_install_spec.rb
index 221ec8fdfc..b734bc57cf 100644
--- a/spec/unit/provider/package/easy_install_spec.rb
+++ b/spec/unit/provider/package/easy_install_spec.rb
@@ -26,11 +26,7 @@ describe Chef::Provider::Package::EasyInstall do
@new_resource = Chef::Resource::EasyInstallPackage.new('boto')
@new_resource.version('1.8d')
- @current_resource = Chef::Resource::EasyInstallPackage.new('boto')
- @current_resource.version('1.8d')
-
@provider = Chef::Provider::Package::EasyInstall.new(@new_resource, @run_context)
- allow(Chef::Resource::Package).to receive(:new).and_return(@current_resource)
@stdin = StringIO.new
@stdout = StringIO.new
@@ -48,8 +44,8 @@ describe Chef::Provider::Package::EasyInstall do
it "should set the current resources package name to the new resources package name" do
allow($stdout).to receive(:write)
- expect(@current_resource).to receive(:package_name).with(@new_resource.package_name)
@provider.load_current_resource
+ expect(@provider.current_resource.package_name).to eq(@new_resource.package_name)
end
it "should return a relative path to easy_install if no easy_install_binary is given" do