Suggest different variables to use if we want to tunnel both v4 and v6
[mirror/dsa-puppet.git] / 3rdparty / modules / concat / spec / acceptance / warnings_spec.rb
1 require 'spec_helper_acceptance'
2
3 describe 'warnings' do
4   basedir = default.tmpdir('concat')
5
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)
10     end
11   end
12
13   context 'concat::fragment target not found' do
14     context 'target not found' do
15     pp = <<-EOS
16       concat { 'file':
17         path => '#{basedir}/file',
18       }
19       concat::fragment { 'foo':
20         target  => '#{basedir}/bar',
21         content => 'bar',
22       }
23     EOS
24     w = 'not found in the catalog'
25
26     it_behaves_like 'has_warning', pp, w
27     end
28   end
29 end