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