inspec/docs/matchers.md
Dominik Richter 47cfffdea1 initial
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-10-07 16:57:55 +02:00

436 B

Matchers

contain_match

Test if an array contains a matching element, which is identified by a regular expression.

describe audit_daemon_rules do
  its("LIST_RULES") {should contain_match(/^exit,always arch=.* key=time-change syscall=adjtimex,settimeofday/) }
end

contain_duplicates

Test if a list contains duplicate elements:

describe etc_group do
  its(:gids) { should_not contain_duplicates }
end