diff options
author | Thomas Gordon <nrgetik@users.noreply.github.com> | 2018-04-27 16:31:20 -0400 |
---|---|---|
committer | Thomas Gordon <nrgetik@users.noreply.github.com> | 2018-04-27 16:31:20 -0400 |
commit | 47c9e27fb3a97814c7c1b64ac47251af0a2cde30 (patch) | |
tree | 269e8658c16644906cff99d8c8a1063787961d05 /spec | |
parent | d5100aaad308401f77586cbffebded2b8edab595 (diff) | |
download | chef-47c9e27fb3a97814c7c1b64ac47251af0a2cde30.tar.gz |
Add test for Chef::Config[:clear_gem_sources]
Signed-off-by: Thomas Gordon <nrgetik@users.noreply.github.com>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/resource/gem_package_spec.rb | 13 |
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 bee7ba9de4..a6a556c333 100644 --- a/spec/unit/resource/gem_package_spec.rb +++ b/spec/unit/resource/gem_package_spec.rb @@ -38,3 +38,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 |