diff options
author | Maxime Brugidou <m.brugidou@criteo.com> | 2015-10-13 12:52:53 +0200 |
---|---|---|
committer | Bryan McLellan <btm@chef.io> | 2015-11-25 12:41:46 -0500 |
commit | 199ec5d16985b6717e0a3b23594ca90c4c50e9c3 (patch) | |
tree | 9bb26ea528601610b16a0c371eef15303345876d /spec/unit/chef_fs | |
parent | 5fd2df311af0b5867c6c845321901f841fc1c7de (diff) | |
download | chef-199ec5d16985b6717e0a3b23594ca90c4c50e9c3.tar.gz |
Add make_child_entry in ChefFS CookbookSubdir
Following a517fa8a we can't call `child` on cookbook subdirs.
Diffstat (limited to 'spec/unit/chef_fs')
-rw-r--r-- | spec/unit/chef_fs/file_system/cookbook_subdir_spec.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/unit/chef_fs/file_system/cookbook_subdir_spec.rb b/spec/unit/chef_fs/file_system/cookbook_subdir_spec.rb new file mode 100644 index 0000000000..94a636fc0a --- /dev/null +++ b/spec/unit/chef_fs/file_system/cookbook_subdir_spec.rb @@ -0,0 +1,34 @@ +# +# Author:: John Keiser (<jkeiser@opscode.com>) +# Copyright:: Copyright (c) 2012 Opscode, Inc. +# License:: Apache License, Version 2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'spec_helper' +require 'chef/chef_fs/file_system/cookbook_subdir' + +describe Chef::ChefFS::FileSystem::CookbookSubdir do + let(:root) do + Chef::ChefFS::FileSystem::BaseFSDir.new('', nil) + end + + let(:cookbook_subdir) do + Chef::ChefFS::FileSystem::CookbookSubdir.new('test', root, false, true) + end + + it 'can get child' do + cookbook_subdir.child('test') + end +end |