summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/shared/unit/file_system_support.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/spec/support/shared/unit/file_system_support.rb b/spec/support/shared/unit/file_system_support.rb
index 3f9e6df3b9..3aee46fc7f 100644
--- a/spec/support/shared/unit/file_system_support.rb
+++ b/spec/support/shared/unit/file_system_support.rb
@@ -17,16 +17,16 @@
#
require 'chef/chef_fs/file_system'
-require 'chef/chef_fs/file_system/memory_root'
-require 'chef/chef_fs/file_system/memory_dir'
-require 'chef/chef_fs/file_system/memory_file'
+require 'chef/chef_fs/file_system/memory/memory_root'
+require 'chef/chef_fs/file_system/memory/memory_dir'
+require 'chef/chef_fs/file_system/memory/memory_file'
module FileSystemSupport
def memory_fs(pretty_name, value, cannot_be_in_regex = nil)
if !value.is_a?(Hash)
raise "memory_fs() must take a Hash"
end
- dir = Chef::ChefFS::FileSystem::MemoryRoot.new(pretty_name, cannot_be_in_regex)
+ dir = Chef::ChefFS::FileSystem::Memory::MemoryRoot.new(pretty_name, cannot_be_in_regex)
value.each do |key, child|
dir.add_child(memory_fs_value(child, key.to_s, dir))
end
@@ -35,13 +35,13 @@ module FileSystemSupport
def memory_fs_value(value, name = '', parent = nil)
if value.is_a?(Hash)
- dir = Chef::ChefFS::FileSystem::MemoryDir.new(name, parent)
+ dir = Chef::ChefFS::FileSystem::Memory::MemoryDir.new(name, parent)
value.each do |key, child|
dir.add_child(memory_fs_value(child, key.to_s, dir))
end
dir
else
- Chef::ChefFS::FileSystem::MemoryFile.new(name, parent, value || "#{name}\n")
+ Chef::ChefFS::FileSystem::Memory::MemoryFile.new(name, parent, value || "#{name}\n")
end
end
@@ -54,7 +54,7 @@ module FileSystemSupport
end
def no_blocking_calls_allowed
- [ Chef::ChefFS::FileSystem::MemoryFile, Chef::ChefFS::FileSystem::MemoryDir ].each do |c|
+ [ Chef::ChefFS::FileSystem::Memory::MemoryFile, Chef::ChefFS::FileSystem::Memory::MemoryDir ].each do |c|
[ :children, :exists?, :read ].each do |m|
allow_any_instance_of(c).to receive(m).and_raise("#{m} should not be called")
end
@@ -67,4 +67,3 @@ module FileSystemSupport
expect(result_paths).to match_array(expected_paths)
end
end
-