summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2018-05-18 10:27:33 +0100
committerGitHub <noreply@github.com>2018-05-18 10:27:33 +0100
commit7edec65fecd800ba350bbe61f5e195e6ff52c022 (patch)
tree03e6bd321d57bba90c86117adb15e13e5f1e8220 /spec/unit
parent2f2336327eb672df18e2b6876a4aa555b7aa5a5e (diff)
parente4ed292f15618d1b556c4ad7081afc4e1f41aa6a (diff)
downloadchef-7edec65fecd800ba350bbe61f5e195e6ff52c022.tar.gz
Merge pull request #7196 from chef/tg/clear_gem_sources_option
Tg/clear gem sources option
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/resource/gem_package_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/resource/gem_package_spec.rb b/spec/unit/resource/gem_package_spec.rb
index 32070e48be..aba6ab1032 100644
--- a/spec/unit/resource/gem_package_spec.rb
+++ b/spec/unit/resource/gem_package_spec.rb
@@ -52,3 +52,16 @@ describe Chef::Resource::GemPackage, "gem_binary" do
expect(resource.gem_binary).to eql("/opt/local/bin/gem")
end
end
+
+describe Chef::Resource::GemPackage, "clear_gem_sources" do
+ let(:resource) { Chef::Resource::GemPackage.new("foo") }
+
+ it "is false by default" do
+ expect(resource.clear_sources).to be false
+ end
+
+ it "sets the default of clear_sources to the config value" do
+ Chef::Config[:clear_gem_sources] = true
+ expect(resource.clear_sources).to be true
+ end
+end