inspec/test/unit/mock/profiles/control_metadata/controls/example.rb
Jerry Aldrich 20776b363d Add support for multiple descriptions for controls (#3424)
* Add support for multiple descriptions for controls

This adds the ability to specify multiple descriptions in controls.

Example:

```ruby
control 'my-control' do
  impact 1.0
  title 'My control'
  desc 'A default description'
  desc 'rational', 'I need an example'
  describe file('/tmp') do
    it { should be_directory }
  end
end
```

Many thanks to @jquick for helping me with the unit tests.
* Remove unused `descriptions` method
* Remove unused profile from test mocks
* Respond to feedback

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-09-26 13:28:57 -04:00

13 lines
327 B
Ruby

# encoding: utf-8
control 'tmp-1.0' do
impact 0.7
title 'Create /tmp directory'
description 'Default description'
description rational: 'Rational for the metadata test control'
description 'something else': 'Even more metadata for the test control'
describe 'a thing' do
it { should cmp 'a thing' }
end
end