Skip to content

Instantly share code, notes, and snippets.

@masaki
Created November 15, 2011 06:21
Show Gist options
  • Save masaki/1366320 to your computer and use it in GitHub Desktop.
Save masaki/1366320 to your computer and use it in GitHub Desktop.
Test::More::Descriptive - Test::More + describe/context/it
package Test::More::Descriptive;
use strict;
use warnings;
use Exporter 'import';
use Test::More ();
BEGIN {
*describe = *context = *it = \&Test::More::subtest;
}
our @EXPORT = qw(describe context it);
1;
use Test::More;
use Test::More::Descriptive;
describe 'Foo' => sub {
context '#bar' => sub {
it 'should return "BAR" string' => sub {
my $foo = Foo->new;
is $foo->bar => 'BAR';
};
};
};
done_testing;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment