Create a composer.json
file:
{
"require-dev": {
"phpspec/phpspec": "^6.2"
},
"config": {
"bin-dir": "bin"
},
"autoload": {"psr-0": {"": "src"}}
}
Follow the instructions on this page to install composer: https://getcomposer.org/download/.
Install phpspec with composer:
composer install
Start writing specs:
bin/phpspec desc Acme/Calculator
Learn more from the documentation.