2014-02-21 19:17:41 +01:00
|
|
|
require 'spec_helper_acceptance'
|
|
|
|
|
|
|
|
describe 'quoted paths' do
|
2014-09-11 18:18:05 +02:00
|
|
|
basedir = default.tmpdir('concat')
|
|
|
|
|
2014-02-21 19:17:41 +01:00
|
|
|
before(:all) do
|
2014-09-11 18:18:05 +02:00
|
|
|
pp = <<-EOS
|
|
|
|
file { '#{basedir}':
|
|
|
|
ensure => directory,
|
|
|
|
}
|
|
|
|
file { '#{basedir}/concat test':
|
|
|
|
ensure => directory,
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
apply_manifest(pp)
|
2014-02-21 19:17:41 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
context 'path with blanks' do
|
|
|
|
pp = <<-EOS
|
2014-09-11 18:18:05 +02:00
|
|
|
concat { '#{basedir}/concat test/foo':
|
2014-02-21 19:17:41 +01:00
|
|
|
}
|
|
|
|
concat::fragment { '1':
|
2014-09-11 18:18:05 +02:00
|
|
|
target => '#{basedir}/concat test/foo',
|
2014-02-21 19:17:41 +01:00
|
|
|
content => 'string1',
|
|
|
|
}
|
|
|
|
concat::fragment { '2':
|
2014-09-11 18:18:05 +02:00
|
|
|
target => '#{basedir}/concat test/foo',
|
2014-02-21 19:17:41 +01:00
|
|
|
content => 'string2',
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
|
|
|
|
it 'applies the manifest twice with no stderr' do
|
2014-09-08 21:01:30 +02:00
|
|
|
apply_manifest(pp, :catch_failures => true)
|
|
|
|
apply_manifest(pp, :catch_changes => true)
|
2014-02-21 19:17:41 +01:00
|
|
|
end
|
|
|
|
|
2014-09-11 18:18:05 +02:00
|
|
|
describe file("#{basedir}/concat test/foo") do
|
2014-02-21 19:17:41 +01:00
|
|
|
it { should be_file }
|
|
|
|
it { should contain "string1\nsring2" }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|