It would be great if we could verify that our Puppet manifests satisfy certain expectations without even having to run Puppet. The rspec-puppet tool is a nifty tool for this. Based on RSpec, a testing framework for Ruby programs, rspec-puppet lets you write test cases for your Puppet manifests that are especially useful for catching regressions (bugs introduced when fixing another bug) and refactoring problems (bugs introduced when reorganizing your code).
Testing your puppet manifests with rspec-puppet
Getting ready
Here's what you'll need to do to install rspec-puppet.
Run the following commands:
t@mylaptop $ sudo /opt/puppetlabs/puppet/bin/gem install rspec-puppet
Fetching: rspec-support-3.7.1.gem (100%)
Successfully...