Skip to content

Instantly share code, notes, and snippets.

@motemen
Created October 3, 2011 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save motemen/1258834 to your computer and use it in GitHub Desktop.
Save motemen/1258834 to your computer and use it in GitHub Desktop.
package t::SomeTest;
use strict;
use warnings;
use parent 'Test::Class';
use Test::More;
use Test::Base;
Test::Builder::plan;
sub test_class_test : Test(1) {
pass;
}
sub test_base_test : Test(1) {
spec_string(our $SPEC);
filters {
input => 'chomp',
expected => 'chomp',
};
run {
my $block = shift;
is reverse($block->input), $block->expected;
};
}
our $SPEC = <<__SPEC__;
=== abc
--- input
abc
--- expected
cba
__SPEC__
__PACKAGE__->runtests if $0 eq __FILE__;
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment