]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/concat/spec/acceptance/validation_spec.rb
upgrade to concat 2.0.0
[dsa-puppet.git] / 3rdparty / modules / concat / spec / acceptance / validation_spec.rb
1 require 'spec_helper_acceptance'
2
3 describe 'concat validate_cmd parameter', :unless => (fact('kernel') != 'Linux') do
4   basedir = default.tmpdir('concat')
5   context '=> "/usr/bin/test -e %"' do
6     before(:all) do
7       pp = <<-EOS
8         file { '#{basedir}':
9           ensure => directory
10         }
11       EOS
12
13       apply_manifest(pp)
14     end
15     pp = <<-EOS
16       concat { '#{basedir}/file':
17         validate_cmd => '/usr/bin/test -e %',
18       }
19       concat::fragment { 'content':
20         target  => '#{basedir}/file',
21         content => 'content',
22       }
23     EOS
24
25     it 'applies the manifest twice with no stderr' do
26       apply_manifest(pp, :catch_failures => true)
27       apply_manifest(pp, :catch_changes => true)
28     end
29
30     describe file("#{basedir}/file") do
31       it { should be_file }
32       it { should contain 'content' }
33     end
34   end
35 end