Update stdlib and concat to 6.1.0 both
[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   before(:all) do
5     @basedir = setup_test_directory
6   end
7
8   describe 'with path with blanks' do
9     let(:pp) do
10       <<-MANIFEST
11         file { '#{@basedir}/concat test':
12           ensure => directory,
13         }
14         concat { '#{@basedir}/concat test/foo':
15         }
16         concat::fragment { '1':
17           target  => '#{@basedir}/concat test/foo',
18           content => 'string1',
19         }
20         concat::fragment { '2':
21           target  => '#{@basedir}/concat test/foo',
22           content => 'string2',
23         }
24       MANIFEST
25     end
26
27     it 'applies the manifest twice with no stderr' do
28       idempotent_apply(pp)
29       expect(file("#{@basedir}/concat test/foo")).to be_file
30       expect(file("#{@basedir}/concat test/foo").content).to match %r{string1string2}
31     end
32   end
33 end