summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-12-16 16:19:37 -0600
committerJay Mundrawala <jdmundrawala@gmail.com>2015-12-16 16:19:37 -0600
commit4b0531742b7e560d04a2fda7bcc24d6da9ea1c60 (patch)
tree8f4e670c80a4deea175463979024f4f3b7c233a9
parentb027f4b9cebda8314118a0839f93d812e1b6fcfa (diff)
parented8f4dc8e40ed0f71ab4f90b9bce91197cce1b9f (diff)
downloadchef-4b0531742b7e560d04a2fda7bcc24d6da9ea1c60.tar.gz
Merge pull request #4320 from chef/jk/fix-package-nil-warning
Fix failing package unit test
-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