From 15d4564c3aa4479becdbb630a34c2142298dbcc4 Mon Sep 17 00:00:00 2001 From: Kimberly Garmoe Date: Tue, 6 Feb 2018 03:27:09 -0800 Subject: [PATCH] Updates directory resource (#2516) * Updates directory resource Signed-off-by: kagarmoe * Updates syntax example Signed-off-by: kagarmoe --- docs/resources/directory.md.erb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/resources/directory.md.erb b/docs/resources/directory.md.erb index 74e8a6868..3f76af41b 100644 --- a/docs/resources/directory.md.erb +++ b/docs/resources/directory.md.erb @@ -4,20 +4,25 @@ title: About the directory Resource # directory -Use the `directory` InSpec audit resource to test if the file type is a directory. This is equivalent to using the `file` 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`. +Use the `directory` InSpec audit resource to test if the file type is a directory. This is equivalent to using the `file` resource and the `be_directory` matcher, but provides a simpler and more direct way to test directories.
## Syntax -A `directory` resource block declares the location of the directory to be tested, and then one (or more) matchers: +A `directory` resource block declares the location of the directory to be tested, and then one (or more) matchers. describe directory('path') do - it { should MATCHER 'value' } + its('property') { should cmp 'value' } end
+## Supported Resource Properties + +All of the properties available to `file` may be used with `directory`. + +
## Matchers -This resource may use any of the matchers available to the `file` resource that may be useful when testing a directory. For a full list of available matchers please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/). +For a full list of available matchers please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).