Module: ChefSpec::API::LogMatchers
- Defined in:
- lib/chefspec/api/log.rb
Overview
Instance Method Summary collapse
-
#write_log(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
log
resource exists in the Chef run with the action:write
.
Instance Method Details
#write_log(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a log
resource exists in the Chef run with the action :write
. Given a Chef Recipe that writes “message” as a log
:
log 'message' do
action :write
end
The Examples section demonstrates the different ways to test a log
resource with ChefSpec.
39 40 41 |
# File 'lib/chefspec/api/log.rb', line 39 def write_log(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:log, :write, resource_name) end |