module-concat/spec/system/warn_spec.rb

42 lines
985 B
Ruby
Raw Normal View History

2013-08-08 17:44:31 +02:00
require 'spec_helper_system'
describe 'basic concat test' do
context 'should run successfully' do
2013-11-14 04:28:27 +01:00
pp = <<-EOS
2013-11-06 04:40:03 +01:00
concat { '/tmp/concat/file':
2013-08-08 17:44:31 +02:00
owner => root,
group => root,
mode => '0644',
warn => true,
}
concat::fragment { '1':
2013-11-06 04:40:03 +01:00
target => '/tmp/concat/file',
2013-08-08 17:44:31 +02:00
content => '1',
order => '01',
}
concat::fragment { '2':
2013-11-06 04:40:03 +01:00
target => '/tmp/concat/file',
2013-08-08 17:44:31 +02:00
content => '2',
order => '02',
}
2013-11-14 04:28:27 +01:00
EOS
2013-08-08 17:44:31 +02:00
context puppet_apply(pp) do
its(:stderr) { should be_empty }
its(:exit_code) { should_not == 1 }
its(:refresh) { should be_nil }
its(:stderr) { should be_empty }
its(:exit_code) { should be_zero }
end
2013-11-06 04:40:03 +01:00
describe file('/tmp/concat/file') do
2013-08-08 17:44:31 +02:00
it { should be_file }
it { should contain '# This file is managed by Puppet. DO NOT EDIT.' }
it { should contain '1' }
it { should contain '2' }
end
end
end