1 require 'spec_helper_acceptance'
3 describe 'concat order' do
5 @basedir = setup_test_directory
7 describe 'sortby alpha' do
10 concat { '#{@basedir}/foo':
13 concat::fragment { '1':
14 target => '#{@basedir}/foo',
18 concat::fragment { '2':
19 target => '#{@basedir}/foo',
23 concat::fragment { '10':
24 target => '#{@basedir}/foo',
25 content => 'string10',
30 it 'applies the manifest twice with no stderr' do
32 expect(file("#{@basedir}/foo")).to be_file
33 expect(file("#{@basedir}/foo").content).to match %r{string1string10string2}
37 describe 'sortby numeric' do
40 concat { '#{@basedir}/foo':
43 concat::fragment { '1':
44 target => '#{@basedir}/foo',
48 concat::fragment { '2':
49 target => '#{@basedir}/foo',
53 concat::fragment { '10':
54 target => '#{@basedir}/foo',
55 content => 'string10',
60 it 'applies the manifest twice with no stderr' do
62 expect(file("#{@basedir}/foo")).to be_file
63 expect(file("#{@basedir}/foo").content).to match %r{string1string2string10}