Closed logicminds closed 9 years ago
Something like the following would work.
require 'puppet/face'
files = Dir.glob("#{manifest_dir}/**/*.pp").each do |file|
begin
Puppet::Face[:parser, '0.0.1'].validate(file)
rescue SystemExit => e
puts "Manifest file :#{file} has errors, please fix"
end
end
fixed in master
Since retrospec doesn't compile the code it has no idea when a manifest is invalid. We should use the puppet parser validate command to validate each manifest before proceding to test creation.