pdcawley / test-class-sugar
- Source
- Commits
- Network (3)
- Issues (0)
- Downloads (1)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Wed Mar 11 04:29:30 -0700 2009 | |
| |
LICENSE | Fri Mar 13 23:32:10 -0700 2009 | |
| |
Makefile.PL | Fri Nov 06 04:39:37 -0800 2009 | |
| |
README.textile | Sat Nov 07 02:43:42 -0800 2009 | |
| |
TODO.pod | Wed Apr 01 23:58:31 -0700 2009 | |
| |
lib/ | Mon Nov 09 15:04:51 -0800 2009 | |
| |
t/ | Tue Jul 21 05:42:01 -0700 2009 |
README.textile
Test::Class::Sugar
Synopsis
Test::Class::Sugar is a declarative wrapper around Adrian Howard’s
Test::Class xUnit style Perl
testing library.
The idea is that, instead of writing:
package Test::Something;
use base qw/Test::Class/;
use Test::Most;
sub subject {
'Something'
}
sub test_something : Test(3) {
my $test = shift;
is $test->current_method, 'test_something';
is $test->subject, 'Something';
isa_ok $test, 'Test::Something';
}
You will be able to write:
use Test::Class::Sugar;
testclass exercises Something {
test something >> 3 {
is $test->current_method, 'test_something';
is $test->subject, 'Something';
isa_ok $test, 'Test::Something';
}
}
