diff options
author | Gomes da Silva <renanvice@gmail.com> | 2015-08-12 10:42:55 +0100 |
---|---|---|
committer | Gomes da Silva <renanvice@gmail.com> | 2015-08-12 10:42:55 +0100 |
commit | 87d10c0e74b850086d11d68ccb908d0aaee1ce4a (patch) | |
tree | ca0706ed969d1221ab7a5f5daa6364e864a0b5a7 /spec/unit/resource | |
parent | 2999d552880ff8fe2d056f89205114ab7c3c9979 (diff) | |
download | chef-87d10c0e74b850086d11d68ccb908d0aaee1ce4a.tar.gz |
Add support for override depth and adding test in overriding depth
Diffstat (limited to 'spec/unit/resource')
-rw-r--r-- | spec/unit/resource/deploy_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/unit/resource/deploy_spec.rb b/spec/unit/resource/deploy_spec.rb index 0403a7ba6b..5b6a452784 100644 --- a/spec/unit/resource/deploy_spec.rb +++ b/spec/unit/resource/deploy_spec.rb @@ -148,10 +148,16 @@ describe Chef::Resource::Deploy do expect(@resource.current_path).to eql("/my/deploy/dir/current") end + it "allows depth to be set via integer" do + expect(@resource.depth).to be_nil + @resource.depth 1 + expect(@resource.depth).to eql(1) + end + it "gives #depth as 5 if shallow clone is true, nil otherwise" do expect(@resource.depth).to be_nil @resource.shallow_clone true - expect(@resource.depth).to eql("5") + expect(@resource.depth).to eql(5) end it "aliases repo as repository" do |