diff options
-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 |