Skip to content

Commit

Permalink
Adds a .pm.PL test.
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders committed Aug 3, 2013
1 parent db037b3 commit 8fedbb4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
20 changes: 20 additions & 0 deletions t/release/pm-PL.t
@@ -0,0 +1,20 @@
use strict;
use warnings;

use Test::More;
use MetaCPAN::Server::Test;

my $model = model();
my $idx = $model->index( 'cpan' );

ok( my $pm = $idx->type( 'file' )->find( 'uncommon:sense' ),
'find sense.pm.PL module' );

is( $pm->name, 'sense.pm.PL', 'name is correct' );

is( $pm->module->[0]->associated_pod,
'MO/uncommon-sense-0.01/sense.pod',
'has associated pod file'
);

done_testing;
14 changes: 14 additions & 0 deletions t/var/fakecpan/configs/uncommon-sense.json
@@ -0,0 +1,14 @@
{
"name": "uncommon-sense",
"abstract": "Distribution with .pm.PL file",
"X_Module_Faker": {
"cpan_author": "MO",
"append": [ {
"file": "sense.pm.PL",
"content": "#! perl-000\n\nour $VERSION = '0.01';\n\n__DATA__\npackage uncommon::sense;"
},{
"file": "sense.pod",
"content": "\n\n=head1 NAME\n\nuncommon::sense - I'm special"
}]
}
}

0 comments on commit 8fedbb4

Please sign in to comment.