X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fconcat%2Fspec%2Facceptance%2Fwarn_spec.rb;fp=3rdparty%2Fmodules%2Fconcat%2Fspec%2Facceptance%2Fwarn_spec.rb;h=0000000000000000000000000000000000000000;hb=5e197fe72fe9bf4fa5a89ee513a3ffc1ea97c8d9;hp=2788607c8445e05f923fa7cfae11adb73b2995bb;hpb=6963202b4b62c2816655ac9532521b018fdf83bd;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/concat/spec/acceptance/warn_spec.rb b/3rdparty/modules/concat/spec/acceptance/warn_spec.rb deleted file mode 100644 index 2788607c8..000000000 --- a/3rdparty/modules/concat/spec/acceptance/warn_spec.rb +++ /dev/null @@ -1,104 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'concat warn =>' do - basedir = default.tmpdir('concat') - context 'true should enable default warning message' do - pp = <<-EOS - concat { '#{basedir}/file': - warn => true, - } - - concat::fragment { '1': - target => '#{basedir}/file', - content => '1', - order => '01', - } - - concat::fragment { '2': - target => '#{basedir}/file', - content => '2', - order => '02', - } - EOS - - it 'applies the manifest twice with no stderr' do - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - describe file("#{basedir}/file") do - it { should be_file } - its(:content) { - should match /# This file is managed by Puppet\. DO NOT EDIT\./ - should match /1/ - should match /2/ - } - end - end - context 'false should not enable default warning message' do - pp = <<-EOS - concat { '#{basedir}/file': - warn => false, - } - - concat::fragment { '1': - target => '#{basedir}/file', - content => '1', - order => '01', - } - - concat::fragment { '2': - target => '#{basedir}/file', - content => '2', - order => '02', - } - EOS - - it 'applies the manifest twice with no stderr' do - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - describe file("#{basedir}/file") do - it { should be_file } - its(:content) { - should_not match /# This file is managed by Puppet\. DO NOT EDIT\./ - should match /1/ - should match /2/ - } - end - end - context '# foo should overide default warning message' do - pp = <<-EOS - concat { '#{basedir}/file': - warn => '# foo', - } - - concat::fragment { '1': - target => '#{basedir}/file', - content => '1', - order => '01', - } - - concat::fragment { '2': - target => '#{basedir}/file', - content => '2', - order => '02', - } - EOS - - it 'applies the manifest twice with no stderr' do - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - describe file("#{basedir}/file") do - it { should be_file } - its(:content) { - should match /# foo/ - should match /1/ - should match /2/ - } - end - end -end