12. describe user 'daniel' do
it { should exist }
it { should belong_to_group 'sudo' }
it { should have_home '/home/daniel' }
end
13. describe package 'ntp' do
it { should be_installed }
end
describe package 'chef' do
it { should be_installed.by('gem') }
end
14. describe service 'ssh' do
it { should be_enabled }
end
describe process 'sshd' do
it { should be_running }
end
describe file '/etc/ssh/sshd_config' do
its(:content) {
should match
/^PermitEmptyPasswordsW+no$/
}
end
15. describe file '~/.ssh/' do
it { should be_directory }
it { should be_mode 700 }
end
describe file '~/.ssh/authorized_keys' do
it { should be_file }
it { should be_mode 600 }
it { should contain('daniel@inuits') }
it { should be_owned_by 'daniel' }
end