Module: ChefSpec::API::StateAttrs
- Defined in:
- lib/chefspec/api/state_attrs.rb
Instance Method Summary collapse
-
#have_state_attrs(*state_attrs) ⇒ ChefSpec::Matchers::StateAttrsMatcher
Assert that a Chef resource has certain state attributes (since Chef 11.8.0):.
Instance Method Details
#have_state_attrs(*state_attrs) ⇒ ChefSpec::Matchers::StateAttrsMatcher
Assert that a Chef resource has certain state attributes (since Chef 11.8.0):
state_attrs :time, :temperature
The Examples section demonstrates the different ways to test a resource’s state_attrs
with ChefSpec.
24 25 26 |
# File 'lib/chefspec/api/state_attrs.rb', line 24 def have_state_attrs(*state_attrs) ChefSpec::Matchers::StateAttrsMatcher.new(state_attrs) end |