mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
Only update if waived
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
This commit is contained in:
parent
e5a96bbd98
commit
bdfff66255
1 changed files with 6 additions and 2 deletions
|
@ -245,8 +245,12 @@ module Inspec
|
|||
tests.each do |key, value|
|
||||
cleared_tests = value.split("control ").collect do |element|
|
||||
next if element.blank?
|
||||
splitlines = element.split("\n")
|
||||
new_element = splitlines[0] + "\ndescribe '---' do\n" + splitlines[1..-1].join("\n") + "\nend\n"
|
||||
if element&.match?(regex_matcher)
|
||||
splitlines = element.split("\n")
|
||||
splitlines[0] + "\ndescribe '---' do\n" + splitlines[1..-1].join("\n") + "\nend\n"
|
||||
else
|
||||
element
|
||||
end
|
||||
end.join("control ")
|
||||
purged_tests[key] = cleared_tests
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue