Commit 240b01f

mo khan <mo@mokhan.ca>
2015-05-01 04:35:40
add spec to lay down apache template.
1 parent 05dd3c7
Changed files (2)
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