Skip to content

Instantly share code, notes, and snippets.

@sletix
Created December 13, 2011 14:36
Show Gist options
  • Select an option

  • Save sletix/1472325 to your computer and use it in GitHub Desktop.

Select an option

Save sletix/1472325 to your computer and use it in GitHub Desktop.
require_once 'Bowling.php';
class DescribeNewBowlingGame extends PHPSpec_Context
{
private $_bowling = null;
public function before()
{
$this->_bowling = new Bowling;
}
public function itShouldScore0ForGutterGame()
{
// allow 20 throws
for ($i=1; $i<=20; $i++) {
$this->_bowling->hit(0);
}
$this->spec($this->_bowling->score)->should->equal(0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment