public
Description: Add Devel::Declare sugar to Test::Class
Homepage:
Clone URL: git://github.com/pdcawley/test-class-sugar.git
commit  83d89b3ddb4b430d7e44e6898d01b8e204ec1038
tree    b7dc27fe08223478728f2e40c4933f2ec38eded2
parent  a696d12438cf6457066e3d9f9ab00946d669ad34
name age message
file .gitignore Wed Mar 11 04:29:30 -0700 2009 Initial import of very crappy library [pdcawley]
file LICENSE Fri Mar 13 23:32:10 -0700 2009 Started adding module paraphenalia [pdcawley]
file Makefile.PL Fri Nov 06 04:39:37 -0800 2009 remove uses of defined-or operator, permits T::... [Joel Bernstein]
file README.textile Loading commit data...
file TODO.pod Wed Apr 01 23:58:31 -0700 2009 Added a TODO.pod for missing features, outstand... [pdcawley]
directory lib/
directory t/ Tue Jul 21 05:42:01 -0700 2009 I feel slightly dirty. Got rid of Modern::Perl ... [pdcawley]
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';
  }
}