Unit testing is testing focused around the smallest unit of code. In the case of Puppet, the smallest functional unit of code is the manifest. RSpec provides us with a unit testing framework for Puppet code, which is fast and effective at checking that our Puppet code is producing the Puppet catalogs we expect. Whatever tests we write in RSpec, we're essentially asking: would what I want be in the Puppet catalog when I execute this code?
RSpec as a system is run on the command line, and does not involve a new virtual machine or container. It is now included in the Puppet PDK under the command pdk test unit. We're going to look at the files involved in running unit tests, and writing simple unit tests from the templates provided by the PDK.
We're beginning a new feature set, so we'll want to start from master, pull down the...