Acme-CPANAuthors
view release on metacpan or search on metacpan
t/01_basic.t view on Meta::CPAN
use strict;
use warnings;
use lib 't/lib';
use Test::More 0.88;
use Acme::CPANAuthors;
my $authors = Acme::CPANAuthors->new('Test');
my $count = $authors->count;
is($count, 1, 'author count');
my @ids = $authors->id;
is(@ids, 1, 'author ids');
t/02_standalone.t view on Meta::CPAN
use strict;
use warnings;
use lib 't/lib';
use Test::More 0.88;
use Acme::CPANAuthors::Test;
my %authors = Acme::CPANAuthors::Test->authors;
is(keys(%authors), 1, 'one author');
is(Acme::CPANAuthors::Test->authors->{ISHIGAKI}, 'Kenichi Ishigaki', 'id -> name mapping');
foreach my $name ( keys %{ Acme::CPANAuthors::Test->authors } ) {
t/03_extra.t view on Meta::CPAN
use strict;
use warnings;
use lib 't/lib';
use Test::More;
use Acme::CPANAuthors;
BEGIN {
eval {require Gravatar::URL; 1} or
plan skip_all => "this test requires Gravatar::URL";
}
plan tests => 1;
t/04_lookfor.t view on Meta::CPAN
use strict;
use warnings;
use lib 't/lib';
use Test::More 0.88;
use Acme::CPANAuthors;
{
my @found = Acme::CPANAuthors->look_for('ISHIGAKI');
ok( @found, 'found by ID' );
ok(( grep { $_->{category} eq 'Test' } @found ), 'found Test ID');
}
{
t/05_kwalitee.t view on Meta::CPAN
use strict;
use warnings;
use lib 't/lib';
use Test::More 0.88;
use Acme::CPANAuthors;
SKIP: {
my $kwalitee = eval { Acme::CPANAuthors->kwalitee('ISHIGAKI') };
if ($@) {
skip "API server seems down; sorry for the inconvenience", 3;
}
ok ref $kwalitee eq 'HASH' && %$kwalitee;
ok $kwalitee->{info}, "has info";
t/06_parse_mailrc.t view on Meta::CPAN
# this test is ripped from Parse::CPAN::Authors
use strict;
use warnings;
#use lib 'lib';
#use IO::Zlib;
#use Test::Exception;
use Test::More tests => 23;
use_ok('Acme::CPANAuthors::Utils::Authors');
my $filename = "t/data/authors/01mailrc.txt";
my $gzfilename = "t/data/authors/01mailrc.txt.gz";
#my $fh = IO::Zlib->new( $gzfilename, "rb" )
# || die "Failed to read $filename: $!";
( run in 0.363 second using v1.01-cache-2.11-cpan-87723dcf8b7 )