Skip to content

pdcawley/test-class-sugar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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';
  }
}

About

Add Devel::Declare sugar to Test::Class

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages