Method: ChefSpec::API::User#remove_user
- Defined in:
- lib/chefspec/api/user.rb
#remove_user(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a user resource exists in the Chef run with the action :remove. Given a Chef Recipe that removes “apache2” as a user:
user 'apache2' do
action :remove
end
The Examples section demonstrates the different ways to test a user resource with ChefSpec.
76 77 78 |
# File 'lib/chefspec/api/user.rb', line 76 def remove_user(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:user, :remove, resource_name) end |