Unit Testing Puppet with rspec-puppet: Mocking Classes and Functions

I’ve created a sample repo on GitHub that has a mini tutorial and examples of how to mock functions, classes, and defined types. This way you you can isolate the specific thing that you want to test (a class, a defined type, a custom function) without inheriting complexity from dependencies.

It’s still in its early stages so bugs and weird things are likely to crop up, but it’s a start!

I wont repeat anything here, this is just a placeholder if anyone finds this page first

Enjoy

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s