1 require 'spec_helper_acceptance'
3 describe 'concat warn =>' do
4 basedir = default.tmpdir('concat')
5 context 'true should enable default warning message' do
7 concat { '#{basedir}/file':
11 concat::fragment { '1':
12 target => '#{basedir}/file',
17 concat::fragment { '2':
18 target => '#{basedir}/file',
24 it 'applies the manifest twice with no stderr' do
25 apply_manifest(pp, :catch_failures => true)
26 apply_manifest(pp, :catch_changes => true)
29 describe file("#{basedir}/file") do
32 should match /# This file is managed by Puppet\. DO NOT EDIT\./
38 context 'false should not enable default warning message' do
40 concat { '#{basedir}/file':
44 concat::fragment { '1':
45 target => '#{basedir}/file',
50 concat::fragment { '2':
51 target => '#{basedir}/file',
57 it 'applies the manifest twice with no stderr' do
58 apply_manifest(pp, :catch_failures => true)
59 apply_manifest(pp, :catch_changes => true)
62 describe file("#{basedir}/file") do
65 should_not match /# This file is managed by Puppet\. DO NOT EDIT\./
71 context '# foo should overide default warning message' do
73 concat { '#{basedir}/file':
77 concat::fragment { '1':
78 target => '#{basedir}/file',
83 concat::fragment { '2':
84 target => '#{basedir}/file',
90 it 'applies the manifest twice with no stderr' do
91 apply_manifest(pp, :catch_failures => true)
92 apply_manifest(pp, :catch_changes => true)
95 describe file("#{basedir}/file") do