Commit 240b01f
Changed files (2)
recipes
spec
recipes/default.rb
@@ -3,3 +3,10 @@ package 'apache2'
service 'apache2' do
action [:enable, :start]
end
+
+template '/var/www/index.html' do
+ owner 'root'
+ group 'root'
+ mode '0755'
+ source 'index.html.erb'
+end
spec/default_spec.rb
@@ -12,4 +12,10 @@ describe 'mokhan-myface::default' do
it 'enables apache2 to start on boot' do
expect(chef_run).to enable_service('apache2')
end
+
+ it 'creates the default template' do
+ expect(chef_run).to create_template('/var/www/index.html')
+ .with_owner('root')
+ .with_group('root')
+ end
end