Update concat
[mirror/dsa-puppet.git] / 3rdparty / modules / concat / spec / acceptance / quoted_paths_spec.rb
1 require 'spec_helper_acceptance'
2
3 describe 'quoted paths' do
4   basedir = default.tmpdir('concat')
5
6   before(:all) do
7     pp = <<-EOS
8       file { '#{basedir}':
9         ensure => directory,
10       }
11       file { '#{basedir}/concat test':
12         ensure => directory,
13       }
14     EOS
15     apply_manifest(pp)
16   end
17
18   context 'path with blanks' do
19     pp = <<-EOS
20       concat { '#{basedir}/concat test/foo':
21       }
22       concat::fragment { '1':
23         target  => '#{basedir}/concat test/foo',
24         content => 'string1',
25       }
26       concat::fragment { '2':
27         target  => '#{basedir}/concat test/foo',
28         content => 'string2',
29       }
30     EOS
31
32     it 'applies the manifest twice with no stderr' do
33       apply_manifest(pp, :catch_failures => true)
34       apply_manifest(pp, :catch_changes => true)
35     end
36
37     describe file("#{basedir}/concat test/foo") do
38       it { should be_file }
39       its(:content) { should match /string1string2/ }
40     end
41   end
42 end