Sha256: 220912320224dcaca37266a32f7dd3d34834a8271ee07d16d9c9f4aa637c171c

Contents?: true

Size: 856 Bytes

Versions: 6

Compression:

Stored size: 856 Bytes

Contents

require 'spec_helper_acceptance'

describe 'concat validate_cmd parameter', :unless => (fact('kernel') != 'Linux') do
  basedir = default.tmpdir('concat')
  context '=> "/usr/bin/test -e %"' do
    before(:all) do
      pp = <<-EOS
        file { '#{basedir}':
          ensure => directory
        }
      EOS

      apply_manifest(pp)
    end
    pp = <<-EOS
      concat { '#{basedir}/file':
        validate_cmd => '/usr/bin/test -e %',
      }
      concat::fragment { 'content':
        target  => '#{basedir}/file',
        content => 'content',
      }
    EOS

    it 'applies the manifest twice with no stderr' do
      apply_manifest(pp, :catch_failures => true)
      apply_manifest(pp, :catch_changes => true)
    end

    describe file("#{basedir}/file") do
      it { should be_file }
      it { should contain 'content' }
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
puppet-retrospec-0.12.1 spec/fixtures/modules/concat/spec/acceptance/validation_spec.rb
puppet-retrospec-0.12.0 spec/fixtures/modules/concat/spec/acceptance/validation_spec.rb
puppet-retrospec-0.11.0 spec/fixtures/modules/concat/spec/acceptance/validation_spec.rb
puppet-retrospec-0.10.0 spec/fixtures/modules/concat/spec/acceptance/validation_spec.rb
puppet-retrospec-0.9.1 spec/fixtures/modules/concat/spec/acceptance/validation_spec.rb
puppet-retrospec-0.9.0 spec/fixtures/modules/concat/spec/acceptance/validation_spec.rb