From the course: Puppet Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Setting up rspec-puppet - Puppet Tutorial
From the course: Puppet Essential Training
Setting up rspec-puppet
- [Instructor] RSPEC-PUPPET is the tool for testing your puppet code. It's based on rspec, which is a ruby testing tool. Rspec and Rspec-puppet have their own domain specific language for creating tests. It's fairly straightforward and you'll find that a lot of the tests follow a very similar pattern. Rspec-puppet is shipped as a gem, so you'll need to install ruby gems onto your development workstation if you haven't already. We're going to follow a slightly different set of instructions than the one on Rspec-Puppet website. I'll hop over to my terminal and the command I want to run is gem install rspec dash puppet. And then, puppetlabs underscore spec underscore helper. And then, rspec dash puppet dash facts. This should automatically install rspec as well since rspec-puppet depends on it. While that's installing in the background, there's one other tool we'll need to set up so let me open a new web tab here. We'll go to puppet dot com slash download dash puppet dash development…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.