public
Description: Add Devel::Declare sugar to Test::Class
Homepage:
Clone URL: git://github.com/pdcawley/test-class-sugar.git
pdcawley (author)
Mon Nov 09 15:04:51 -0800 2009
commit  2118e28fa4bc760402626e2b59cf22d1c205e03f
tree    b355fd5896a21933178f65109a79d640889251c9
parent  83d89b3ddb4b430d7e44e6898d01b8e204ec1038
name age message
file .gitignore Loading commit data...
file LICENSE
file Makefile.PL
file README.textile
file TODO.pod
directory lib/
directory t/
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';
  }
}