comparison modules/concat/spec/acceptance/empty_spec.rb @ 36:37675581a273 puppet-3.6

Update Puppet module for Apache (pulls in concat module)
author IBBoard <dev@ibboard.co.uk>
date Sat, 14 Mar 2015 20:07:04 +0000
parents 956e484adc12
children
comparison
equal deleted inserted replaced
35:1bb941522ebf 36:37675581a273
1 require 'spec_helper_acceptance' 1 require 'spec_helper_acceptance'
2 2
3 describe 'concat force empty parameter' do 3 describe 'concat force empty parameter' do
4 basedir = default.tmpdir('concat')
4 context 'should run successfully' do 5 context 'should run successfully' do
5 pp = <<-EOS 6 pp = <<-EOS
6 concat { '/tmp/concat/file': 7 concat { '#{basedir}/file':
7 owner => root,
8 group => root,
9 mode => '0644', 8 mode => '0644',
10 force => true, 9 force => true,
11 } 10 }
12 EOS 11 EOS
13 12
14 it 'applies the manifest twice with no stderr' do 13 it 'applies the manifest twice with no stderr' do
15 expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") 14 apply_manifest(pp, :catch_failures => true)
16 expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") 15 apply_manifest(pp, :catch_changes => true)
17 end 16 end
18 17
19 describe file('/tmp/concat/file') do 18 describe file("#{basedir}/file") do
20 it { should be_file } 19 it { should be_file }
21 it { should_not contain '1\n2' } 20 its(:content) { should_not match /1\n2/ }
22 end 21 end
23 end 22 end
24 end 23 end