CodeSpecs works in Codeception unit tests the same way as in PHPUnit tests even with the same interface(the only thing not available in Codeception is expectTo method as Codeception already has such method).
To enable CodeSpecs module you just need to add following line to enabled modules:
- \PHPKitchen\CodeSpecs\Integration\Codeception\CodeSpecsExample of unit tests suite configuration:
suites:
Unit:
path: Unit
actor: UnitTester
modules:
enabled:
- Asserts
- \Helper\Unit
- \PHPKitchen\CodeSpecs\Integration\Codeception\CodeSpecsNote: don't forget to re-build helpers after modules configuration (codecept build).