Sha256: 5731623ab283295ad699466a3c6f877246dee1a398a8900feca03f5bc6e55ce3

Contents?: true

Size: 570 Bytes

Versions: 4

Compression:

Stored size: 570 Bytes

Contents

require 'spec_helper_acceptance'

describe '<%= @type.name -%> <%= @type.type %>' do
  describe 'running puppet code' do
    it 'should work with no errors' do
      pp = <<-EOS
class { '<%= @type.name %>':
<%- @parameters.each do |k,v| -%>
  <%- if v.nil? -%>
  <%= "#{k} => 'place_value_here'," %>
  <%- else -%>
  <%= "##{k} => #{v}," %>
  <%- end -%>
<%- end -%>
}
      EOS

   # Run it twice and test for idempotency
      apply_manifest(pp, :catch_failures => true)
      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
puppet-retrospec-0.6.0 lib/retrospec/templates/acceptance_spec_test.erb
puppet-retrospec-0.5.1 lib/retrospec/templates/acceptance_spec_test.erb
puppet-retrospec-0.5.0 lib/retrospec/templates/acceptance_spec_test.erb
puppet-retrospec-0.4.0 lib/templates/acceptance_spec_test.erb