Open
Description
inspec/utils/object_traversal
is useful for multi level traversal of an object using method_missing, if there are many possible things you might need to check. The core InSpec JSON resource is a good example of this since there's no way of knowing when you write the resource the things that users will need to check. The same magic can be implemented in custom resources using object traversal e.g.
its(%w(SomePolicy OptionA)) { should cmp false }
its(%w(SomePolicy OptionB)) { should cmp false }
its(%w(SomePolicy HashOfOptions OptionZ)) { should cmp false }