Sha256: ae5bcf051320313ccee9b6a6ee7ea351fc25565946f1d8c38e235d1b453ece5d
Contents?: true
Size: 725 Bytes
Versions: 102
Compression:
Stored size: 725 Bytes
Contents
# encoding: utf-8 require 'resources/file' module Inspec::Resources class Directory < FileResource name 'directory' supports platform: 'unix' supports platform: 'windows' desc 'Use the directory InSpec audit resource to test if the file type is a directory. This is equivalent to using the file InSpec audit resource and the be_directory matcher, but provides a simpler and more direct way to test directories. All of the matchers available to file may be used with directory.' example " describe directory('path') do it { should be_directory } end " def exist? file.exist? && file.directory? end def to_s "Directory #{source_path}" end end end
Version data entries
102 entries across 102 versions & 2 rubygems