fuel-library/deployment/puppet/vcsrepo/spec/support/filesystem_helpers.rb
Eugene Kirpichov 25b5c79906 Initial commit
2012-09-07 17:38:58 -07:00

19 lines
484 B
Ruby

module FilesystemHelpers
def expects_chdir(path = resource.value(:path))
Dir.expects(:chdir).with(path).at_least_once.yields
end
def expects_mkdir(path = resource.value(:path))
Dir.expects(:mkdir).with(path).at_least_once
end
def expects_rm_rf(path = resource.value(:path))
FileUtils.expects(:rm_rf).with(path)
end
def expects_directory?(returns = true, path = resource.value(:path))
File.expects(:directory?).with(path).returns(returns)
end
end