Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / concat / spec / acceptance / concurrency_spec.rb
1 require 'spec_helper_acceptance'
2
3 describe 'concurrency, with file recursive purge' do
4   before(:all) do
5     @basedir = setup_test_directory
6   end
7
8   describe 'when run should still create concat file' do
9     let(:pp) do
10       <<-MANIFEST
11         file { '#{@basedir}/bar':
12           ensure => directory,
13           purge  => true,
14           recurse => true,
15         }
16
17         concat { "foobar":
18           ensure => 'present',
19           path   => '#{@basedir}/bar/foobar',
20         }
21
22         concat::fragment { 'foo':
23           target => 'foobar',
24           content => 'foo',
25         }
26       MANIFEST
27     end
28
29     it 'applies the manifest twice with no stderr' do
30       idempotent_apply(pp)
31       expect(file("#{@basedir}/bar/foobar")).to be_file
32       expect(file("#{@basedir}/bar/foobar").content).to match 'foo'
33     end
34   end
35 end