ChefSpec in Chef

Is an extension of RSpec, a behavior-driven development (BDD) framework for Ruby. ChefSpec is built on the RSpec DSL.

RSpec is a behavior-driven development (BDD) framework that uses a natural language domain-specific language (DSL) to quickly describe scenarios in which systems are being tested. RSpec allows a scenario to be set up, and then executed. The results are compared to a set of defined expectations.

RSpec typically utilizes inside of your cookbooks the spec/ directory - this is useful when you want to test small manageable pieces of the cookbooks.

Accesible via:

chef exec rspec --help