diff options
author | danielsdeleo <dan@chef.io> | 2016-02-26 17:28:45 -0800 |
---|---|---|
committer | danielsdeleo <dan@chef.io> | 2016-02-26 17:42:30 -0800 |
commit | c170a5addb70ffd014ba9ec6e43d2bd72e56529e (patch) | |
tree | 24a377b8ff188191276ce0d1860ed8be52380ac7 /spec | |
parent | 1691eab8b6b1abcf532858718fabe1bcdd10bd30 (diff) | |
download | chef-c170a5addb70ffd014ba9ec6e43d2bd72e56529e.tar.gz |
Filter out directory paths from all_files when loadinglist-unignored-files
Diffstat (limited to 'spec')
-rw-r--r-- | spec/data/cookbooks/openldap/.root_dotfile | 0 | ||||
-rw-r--r-- | spec/unit/cookbook/cookbook_version_loader_spec.rb | 8 |
2 files changed, 8 insertions, 0 deletions
diff --git a/spec/data/cookbooks/openldap/.root_dotfile b/spec/data/cookbooks/openldap/.root_dotfile new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/spec/data/cookbooks/openldap/.root_dotfile diff --git a/spec/unit/cookbook/cookbook_version_loader_spec.rb b/spec/unit/cookbook/cookbook_version_loader_spec.rb index 0c4814021c..87d0f1e032 100644 --- a/spec/unit/cookbook/cookbook_version_loader_spec.rb +++ b/spec/unit/cookbook/cookbook_version_loader_spec.rb @@ -73,8 +73,16 @@ describe Chef::Cookbook::CookbookVersionLoader do expect(loaded_cookbook.file_filenames).to include(full_path("/files/default/remotedir/.a_dotdir/.a_dotfile_in_a_dotdir")) end + it "loads root files that start with a ." do + expect(loaded_cookbook.all_files).to include(full_path(".root_dotfile")) + expect(loaded_cookbook.root_filenames).to include(full_path(".root_dotfile")) + end + it "loads all unignored files, even if they don't match a segment type" do expect(loaded_cookbook.all_files).to include(full_path("/spec/spec_helper.rb")) + + # Directories need to be filtered out, though: + expect(loaded_cookbook.all_files).to_not include(full_path("/spec")) end it "should load the metadata for the cookbook" do |