To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorGetting Started
Installation
The only documented way to install dspec
is with Composer
$ composer.phar require --dev davedevelopment/dspec:*
Usage
Create a Spec file
<?php
// BowlingSpec.php
require_once 'Bowling.php';
require_once 'hamcrest/Hamcrest.php';
describe("Bowling", function() {
beforeEach(function() { // run before every sibling and descendant it()
$this->bowling = new Bowling; // PHP 5.4's closure binding allows the use of this
});
it("should score zero for gutter game", function() {
for ($i = 0; $i < 20; $i++) {
$this->bowling->hit(0);
}
assertThat($this->bowling->score, equalTo(0)); // hamcrest assertion
});
});
Run it
$ vendor/bin/dspec BowlingSpec.php
Last published over 5 years ago by Dave Marshall.