Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Tests no longer use -T; author tests (boilerplate+pod) flagged as such
Test files' -T didn't like my local::lib environment.
Boilerplate and POD shouldn't really be tested by any end user.
  • Loading branch information
mfontani committed Nov 21, 2009
1 parent 3239484 commit f2ec4dc
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 19 deletions.
7 changes: 5 additions & 2 deletions t/00-load.t
@@ -1,9 +1,12 @@
#!perl -T
#!perl

use Test::More tests => 1;
use Test::More tests => 4;

BEGIN {
use_ok('Net::RackSpace::CloudServers');
use_ok('Net::RackSpace::CloudServers::Flavor');
use_ok('Net::RackSpace::CloudServers::Image');
use_ok('Net::RackSpace::CloudServers::Server');
}

diag("Testing Net::RackSpace::CloudServers $Net::RackSpace::CloudServers::VERSION, Perl $], $^X");
2 changes: 1 addition & 1 deletion t/01-author-list.t
@@ -1,4 +1,4 @@
#!perl -T
#!perl
use strict;
use warnings;
use Test::More;
Expand Down
26 changes: 11 additions & 15 deletions t/boilerplate.t
@@ -1,8 +1,12 @@
#!perl -T
#!perl

use strict;
use warnings;
use Test::More tests => 3;
use Test::More;

plan skip_all => 'author tests run only if $ENV{CLOUDSERVERS_AUTHOR_TESTS} set'
if ( !defined $ENV{'CLOUDSERVERS_AUTHOR_TESTS'} || !$ENV{'CLOUDSERVERS_AUTHOR_TESTS'} );
plan 'no_plan';

sub not_in_file_ok {
my ( $filename, %regex ) = @_;
Expand Down Expand Up @@ -36,17 +40,9 @@ sub module_boilerplate_ok {
);
}

TODO: {
local $TODO = "Need to replace the boilerplate text";

not_in_file_ok(
README => "The README is used..." => qr/The README is used/,
"'version information here'" => qr/to provide version information/,
);

not_in_file_ok( Changes => "placeholder date/time" => qr(Date/time) );

module_boilerplate_ok('lib/Net/RackSpace/CloudServers.pm');

}
not_in_file_ok( Changes => "placeholder date/time" => qr(Date/time) );
module_boilerplate_ok('lib/Net/RackSpace/CloudServers.pm');
module_boilerplate_ok('lib/Net/RackSpace/CloudServers/Flavor.pm');
module_boilerplate_ok('lib/Net/RackSpace/CloudServers/Image.pm');
module_boilerplate_ok('lib/Net/RackSpace/CloudServers/Server.pm');

4 changes: 4 additions & 0 deletions t/pod-coverage.t
@@ -1,7 +1,11 @@
#!perl
use strict;
use warnings;
use Test::More;

plan skip_all => 'author tests run only if $ENV{CLOUDSERVERS_AUTHOR_TESTS} set'
if ( !defined $ENV{'CLOUDSERVERS_AUTHOR_TESTS'} || !$ENV{'CLOUDSERVERS_AUTHOR_TESTS'} );

# Ensure a recent version of Test::Pod::Coverage
my $min_tpc = 1.08;
eval "use Test::Pod::Coverage $min_tpc";
Expand Down
5 changes: 4 additions & 1 deletion t/pod.t
@@ -1,9 +1,12 @@
#!perl -T
#!perl

use strict;
use warnings;
use Test::More;

plan skip_all => 'author tests run only if $ENV{CLOUDSERVERS_AUTHOR_TESTS} set'
if ( !defined $ENV{'CLOUDSERVERS_AUTHOR_TESTS'} || !$ENV{'CLOUDSERVERS_AUTHOR_TESTS'} );

# Ensure a recent version of Test::Pod
my $min_tp = 1.22;
eval "use Test::Pod $min_tp";
Expand Down

0 comments on commit f2ec4dc

Please sign in to comment.