Skip to content

Instantly share code, notes, and snippets.

@arthurschreiber
Created August 7, 2008 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arthurschreiber/4513 to your computer and use it in GitHub Desktop.
Save arthurschreiber/4513 to your computer and use it in GitHub Desktop.
<?php
namespace FsckUnit;
class Bowling
{
public $score = 0;
public function hit()
{
}
}
describe("A new Bowling Game", function() {
before("each", function($state) {
$state->bowling = new Bowling();
});
it("should score 0 for gutter game", function($state) {
for ($i=1; $i<=20; $i++) {
$state->bowling->hit(0);
}
expect($state->bowling->score)->to("equal", 0);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment