This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
README.md | ||
| |
lib/ | ||
| |
runner.php | ||
| |
spec_helper.php |
README.md
SimpleSpec
PHP SimpleTest extension for Behavior driven development(BDD), An extension class for SimpleTest
why not PHPSpec? well its a good project but SimpleTest i want something simpler
Features
- Reuse SimpleTest framework
- simplly one include from away
- Underscore for readibility - all examples uses underscore to seperate descriptions.
- Natural language grammer
- before_all, after_all is not supported, i don't want to modify SimpleTest
- conventional before/after named prepare/cleanup respectively
Requirement
- PHP 5.1 +
- SimpleTest installed
Example
<?php
require 'spec_helper.php';
class Describe_his_mum extends SimpleSpec {
function prepare() {
$this->mum = new Mum(array('mood'=>'angry'));
}
function should_be_very_angry_when_i_break_my_lunch_box() {
expects($this->mum->mood)->should_be('angry');
}
function should_be_very_happy_when_i_punch_her_in_the_face() {
punch($this->mum);
expects($this->mum->mood)->should_be('happy');
}
function cleanup() {
unset($this->mum); // kill da mum
}
}
?>
Author
Taylor Luk aka 'speedmax'








