Sha256: 212fedf2e484ad30febf7b10ffc7503df6f6c5b4957ecf52621e484a4257c5ea

Contents?: true

Size: 965 Bytes

Versions: 7

Compression:

Stored size: 965 Bytes

Contents

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
freighthop-0.6.1 modules/concat/spec/unit/classes/concat_setup_spec.rb
freighthop-0.6.0 modules/concat/spec/unit/classes/concat_setup_spec.rb
freighthop-0.5.2 modules/concat/spec/unit/classes/concat_setup_spec.rb
freighthop-0.5.1 modules/concat/spec/unit/classes/concat_setup_spec.rb
freighthop-0.5.0 modules/concat/spec/unit/classes/concat_setup_spec.rb
freighthop-0.4.1 modules/concat/spec/unit/classes/concat_setup_spec.rb
freighthop-0.4.0 modules/concat/spec/unit/classes/concat_setup_spec.rb