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