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