summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-12-11 13:19:58 -0800
committerJohn Keiser <john@johnkeiser.com>2015-12-15 11:16:20 -0800
commitb743fcdbd172862386d172b42bbbc31cfe2f4239 (patch)
treeaeb3a60c86bbd98c5502b86483848a5cc5122fc3 /spec/unit
parent44494c91587ff0313d328d9c4ec016e6fcf5f830 (diff)
downloadchef-b743fcdbd172862386d172b42bbbc31cfe2f4239.tar.gz
Use properties in package resourcesjk/package-properties
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/provider/package/pacman_spec.rb1
-rw-r--r--spec/unit/provider/package/zypper_spec.rb1
-rw-r--r--spec/unit/resource/chef_gem_spec.rb6
3 files changed, 1 insertions, 7 deletions
diff --git a/spec/unit/provider/package/pacman_spec.rb b/spec/unit/provider/package/pacman_spec.rb
index fcb9f8a86c..da27edafeb 100644
--- a/spec/unit/provider/package/pacman_spec.rb
+++ b/spec/unit/provider/package/pacman_spec.rb
@@ -62,7 +62,6 @@ ERR
it "should set the installed version to nil on the current resource if pacman installed version not exists" do
allow(@provider).to receive(:shell_out).and_return(@status)
- expect(@current_resource).to receive(:version).with(nil).and_return(true)
@provider.load_current_resource
end
diff --git a/spec/unit/provider/package/zypper_spec.rb b/spec/unit/provider/package/zypper_spec.rb
index 18ff739bc6..661bca4c1b 100644
--- a/spec/unit/provider/package/zypper_spec.rb
+++ b/spec/unit/provider/package/zypper_spec.rb
@@ -68,7 +68,6 @@ describe Chef::Provider::Package::Zypper do
it "should set the installed version to nil on the current resource if zypper info installed version is (none)" do
allow(provider).to receive(:shell_out).and_return(status)
- expect(current_resource).to receive(:version).with(nil).and_return(true)
provider.load_current_resource
end
diff --git a/spec/unit/resource/chef_gem_spec.rb b/spec/unit/resource/chef_gem_spec.rb
index fe788075fd..df37779d1b 100644
--- a/spec/unit/resource/chef_gem_spec.rb
+++ b/spec/unit/resource/chef_gem_spec.rb
@@ -34,16 +34,12 @@ end
describe Chef::Resource::ChefGem, "gem_binary" do
let(:resource) { Chef::Resource::ChefGem.new("foo") }
- before(:each) do
- expect(RbConfig::CONFIG).to receive(:[]).with('bindir').and_return("/opt/chef/embedded/bin")
- end
-
it "should raise an exception when gem_binary is set" do
expect { resource.gem_binary("/lol/cats/gem") }.to raise_error(ArgumentError)
end
it "should set the gem_binary based on computing it from RbConfig" do
- expect(resource.gem_binary).to eql("/opt/chef/embedded/bin/gem")
+ expect(resource.gem_binary).to eql("#{RbConfig::CONFIG['bindir']}/gem")
end
it "should set the gem_binary based on computing it from RbConfig" do