Ask Your Question

Revision history [back]

Rspec-puppet works by compiling a catalog and comparing the results of the catalog. It doesn't actually execute the catalog per se, it just compiles it. This is by design, and totally intentional.

However, if you want to test the real effect of your code, you have to use something like beaker instead, which provides system testing. Its a different level of testing and much more involved and usually goes hand-in-hand with rspec-puppet testing, but actually makes the real changes on the system and checks for real results.

Rspec-puppet works by compiling a catalog and comparing the results of the catalog. It doesn't actually execute the catalog per se, it just compiles it. This is by design, and totally intentional.intentional. This is why you don't see any changes when using rspec-puppet to test content, because it tries hard _not_ to touch any part of the operating system.

However, if you want to test the real effect of your code, you have to use something like beaker instead, which provides system testing. Its a different level of testing and much more involved and usually goes hand-in-hand with rspec-puppet testing, but actually makes the real changes on the system and checks for real results.