the rake’s spec command does is comprised of the following: spec = spec_prep + spec_standalone + spec_clean So we need to avoid running spec_clean. To do this simply run: $ bundle exec rake spec_prep After that, always run $ bundle exec rake spec_standalone Instead of the “spec” command
https://github.com/mcanevet/rspec-puppet-facts # lets you set a bunch of default facts.
RSpec is all about unit testing. That means we test the class without the need for changing the state of any puppet agents, i.e. it’s a bit like a dry run. When we run an rspec tests, all that happens is that the rspec test provides a set of dummy […]
RSpec is a BDD unit testing framework that is designed for testing ruby code. When we run a RSpec test scripts against our puppet code we are working on, the following takes place: RSpec temporarily generates it’s own site.pp file, and then instructs the puppetmaster to use make use of […]
Install RVM and Bundler RSpec tests needs to be run in a tightly controlled environment. This will help ensure that the RSpec tests that you write/run in on your machine will also run on other people’s machine too. The environment has to be controlled in the in the following context: […]
http://puppetlabs.com/blog/the-next-generation-of-puppet-module-testing http://puppetlabs.com/presentations/puppet-loves-rspec-why-you-should-too http://puppetlabs.com/blog/verifying-puppet-checking-syntax-and-writing-automated-tests http://puppetlabs.com/presentations/beaker-automated-cloud-based-acceptance-testing-alice-nodelman-puppet-labs http://rspec-puppet.com/tutorial/ Beaker: http://puppetlabs.com/search/node/beaker http://puppetlabs.com/presentations/beaker-automated-cloud-based-acceptance-testing-alice-nodelman-puppet-labs http://puppetlabs.com/podcasts/podcast-beaker-cloud-enabled-acceptance-testing-tool