summaryrefslogtreecommitdiff
path: root/spec/unit/resource
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-04-15 11:36:37 -0700
committerTim Smith <tsmith@chef.io>2019-04-15 11:36:37 -0700
commit02be687aedc00cbb9d353fdf237895c01d8e730b (patch)
tree27be7116fe17da579746571325f29c7bf73e2be6 /spec/unit/resource
parentae43342056c65422df4f350dc9c389c5bd5d166d (diff)
downloadchef-02be687aedc00cbb9d353fdf237895c01d8e730b.tar.gz
Fix specs and chefstyle warningsarchive_file
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/unit/resource')
-rw-r--r--spec/unit/resource/archive_file_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/unit/resource/archive_file_spec.rb b/spec/unit/resource/archive_file_spec.rb
index 053c8d614a..d9f40c0d65 100644
--- a/spec/unit/resource/archive_file_spec.rb
+++ b/spec/unit/resource/archive_file_spec.rb
@@ -26,7 +26,7 @@ describe Chef::Resource::ArchiveFile do
end
it "has a name property of path" do
- expect(resource.path).to eql("foo")
+ expect(resource.path).to match(/.*foo$/)
end
it "sets the default action as :extract" do
@@ -37,4 +37,11 @@ describe Chef::Resource::ArchiveFile do
expect { resource.action :extract }.not_to raise_error
end
+ it "mode property defaults to '755'" do
+ expect(resource.mode).to eql("755")
+ end
+
+ it "options property defaults to [:time]" do
+ expect(resource.options).to eql([:time])
+ end
end