Class: Approvals
- Inherits:
-
Object
- Object
- Approvals
- Defined in:
- lib/simple_approvals/chefspec/approvals.rb
Overview
open SimpleApprovals::Approvals and add a ChefSpec-specific helper
Class Method Summary collapse
Class Method Details
.chef_template_verifier_for(expected_path, approved_path, **options) ⇒ Object
89 90 91 92 93 94 95 96 97 |
# File 'lib/simple_approvals/chefspec/approvals.rb', line 89 def chef_template_verifier_for(expected_path, approved_path, **) [:message_override] = %(expected Chef run to render "#{expected_path}" matching "#{approved_path}") proc do |rendered_content| rendered_content = yield(rendered_content) if block_given? rendered_content = [:scrubber].call(rendered_content) if [:scrubber] verify(rendered_content, approved_path, **) end end |