Difference between spec and test folder after creation of cookbook

Hi All,

After running command
chef generate cookbook stash I could see a directory tree created
In tat I could see
spec and test

Could anyone tell me why there are 2 test directories and use of each directory?
Where should I write unit and integration tests?

Thanks and Regards,
Pankaj

Hi,

Could anyone please clarify my doubt?

Thanks and Regards,
Pankaj

The spec directory is for unit tests with ChefSpec.

The test directory is for integration tests. In the latest versions of ChefDK these are intended to be written with inspec.

Noah has written some good advice about what each kind of test is good for in a Chef context here: The Dangers of Overtesting – Noah Kantrowitz