1 require 'spec_helper_acceptance'
3 describe 'deprecation warnings' do
4 basedir = default.tmpdir('concat')
6 shared_examples 'has_warning' do |pp, w|
7 it 'applies the manifest twice with a stderr regex' do
8 expect(apply_manifest(pp, :catch_failures => true).stderr).to match(/#{Regexp.escape(w)}/m)
9 expect(apply_manifest(pp, :catch_changes => true).stderr).to match(/#{Regexp.escape(w)}/m)
13 context 'concat force parameter' do
15 concat { '#{basedir}/file':
18 concat::fragment { 'foo':
19 target => '#{basedir}/file',
23 w = 'The $force parameter to concat is deprecated and has no effect.'
25 it_behaves_like 'has_warning', pp, w
28 context 'concat::fragment ensure parameter' do
29 context 'target file exists' do
31 concat { '#{basedir}/file':
33 concat::fragment { 'foo':
34 target => '#{basedir}/file',
39 w = 'The $ensure parameter to concat::fragment is deprecated and has no effect.'
41 it_behaves_like 'has_warning', pp, w