Sha256: 83af38325bd1d714636792faf6d4b7cb1e75402acf902e0b290036f226597d20
Contents?: true
Size: 750 Bytes
Versions: 5
Compression:
Stored size: 750 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
5 entries across 5 versions & 1 rubygems