1 require 'spec_helper_acceptance'
3 describe 'concat ensure_newline parameter' do
5 @basedir = setup_test_directory
7 describe 'when false' do
10 concat { '#{@basedir}/file':
11 ensure_newline => false,
13 concat::fragment { '1':
14 target => '#{@basedir}/file',
17 concat::fragment { '2':
18 target => '#{@basedir}/file',
24 it 'applies the manifest twice with no stderr' do
26 expect(file("#{@basedir}/file")).to be_file
27 expect(file("#{@basedir}/file").content).to match '12'
31 describe 'when true' do
34 concat { '#{@basedir}/file':
35 ensure_newline => true,
37 concat::fragment { '1':
38 target => '#{@basedir}/file',
41 concat::fragment { '2':
42 target => '#{@basedir}/file',
48 it 'applies the manifest twice with no stderr' do
50 expect(file("#{@basedir}/file")).to be_file
51 expect(file("#{@basedir}/file").content).to match %r{1\r?\n2\r?\n}