Skip to content

Commit

Permalink
add example for yumconf-like structured files
Browse files Browse the repository at this point in the history
  • Loading branch information
Victoria Jeffrey committed Sep 28, 2016
1 parent 593bdbc commit c087a33
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/resources/parse_config_file.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,9 @@ The following examples show how to use this InSpec audit resource.
describe parse_config_file('/path/to/file.conf', { multiple_values: true }) do
its('PARAM_X') { should include 'Y' }
end

## Test a file with an ini-like structure (such as a yum.conf)

describe parse_config_file('/path/to/yum.conf') do
its('main') { should include('gpgcheck' => '1') }
end

0 comments on commit c087a33

Please sign in to comment.