fuel-library/deployment/puppet/concat/spec/unit/classes/concat_setup_spec.rb
Stanislaw Bogatkin 4b68e7b674 Sync puppet concat module to v1.1.0 from upstream
v1.1.0 sha1: a50226b4ec5d6f2ba0df9e4f8a31df3e1160ff89
Implements: blueprint merge-openstack-puppet-modules

Change-Id: I8ac6ed2a802628025b51a1c5479661f7e0e946b7
2014-06-19 18:16:13 +04:00

43 lines
965 B
Ruby

require 'spec_helper'
describe 'concat::setup', :type => :class do
shared_examples 'setup' do |concatdir|
concatdir = '/foo' if concatdir.nil?
let(:facts) {{ :concat_basedir => concatdir }}
it do
should contain_file("#{concatdir}/bin/concatfragments.sh").with({
:mode => '0755',
:source => 'puppet:///modules/concat/concatfragments.sh',
:backup => false,
})
end
[concatdir, "#{concatdir}/bin"].each do |file|
it do
should contain_file(file).with({
:ensure => 'directory',
:mode => '0755',
:backup => false,
})
end
end
end
context 'facts' do
context 'concat_basedir =>' do
context '/foo' do
it_behaves_like 'setup', '/foo'
end
end
end # facts
context 'deprecated as a public class' do
it 'should create a warning' do
pending('rspec-puppet support for testing warning()')
end
end
end