This is a place to test cookbook testing integrations
tailor
- checks for preferred ruby styling. Initial guard against malformed rubyfoodcritic
- lints style, correctnessknife cookbook test
- checks correct syntax for a cookbookchefspec
- unit tests the chef convergence logic
- guard - run unit tests during development
- travis-ci - run integration tests post-commit
-
Fork/clone repo
-
Install development dependencies:
bundle install
-
Download any dependencies, run all tests:
rake berks rake
-
Start up
guard
:bundle exec guard start
guard
will executefoodcritic
andchefspec
tests as files are saved. -
Checkout a Feature branch, name it well!
git checkout -b <featurename>
-
Make changes
-
Commit, issue pull request
-
Beer!
Travis should not be checking style - that's part of development, but it does anyways.
Running unit tests against any cookbook that has dependencies (which many do) requires those dependencies to be available at test run time. Since Guard will watch files for changes, this means that getting the dependencies in place is crucial.
Berkshelf will install compiled cookbooks into ./cookbooks
and then Guard will
watch <repo root>/cookbooks/<cookbook name>/[spec|any ruby file]
.