summaryrefslogtreecommitdiff
path: root/spec/unit/chef_fs
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-08-01 19:43:04 +0100
committerThom May <thom@chef.io>2016-08-02 08:32:33 +0100
commit9e12616c410175a425552240d37a35d3b2498c24 (patch)
tree79106589c4cc9694c24b9281b60f0446d0503f2a /spec/unit/chef_fs
parentf8dbdb18f4bcbc94d647d726ebb96ed6fcee8d4f (diff)
downloadchef-9e12616c410175a425552240d37a35d3b2498c24.tar.gz
Invalidate the cache on file creationtm/cache_invalidate
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'spec/unit/chef_fs')
-rw-r--r--spec/unit/chef_fs/file_system/repository/directory_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/unit/chef_fs/file_system/repository/directory_spec.rb b/spec/unit/chef_fs/file_system/repository/directory_spec.rb
index e050181be9..6e53e52966 100644
--- a/spec/unit/chef_fs/file_system/repository/directory_spec.rb
+++ b/spec/unit/chef_fs/file_system/repository/directory_spec.rb
@@ -76,6 +76,7 @@ describe Chef::ChefFS::FileSystem::Repository::Directory do
context "#create_child" do
it "creates a new TestFile" do
expect(TestFile).to receive(:new).with("test_child", test_directory).and_return(file_double)
+ allow(file_double).to receive(:file_path).and_return("#{test_directory}/test_child")
expect(file_double).to receive(:write).with("test")
test_directory.create_child("test_child", "test")
end