Permalink
Browse files

update author tests

  • Loading branch information...
1 parent 5a9e2e7 commit 1052f83c18892f0a5492ca2f95d832438796ec58 @gray committed Mar 21, 2011
Showing with 27 additions and 24 deletions.
  1. +1 −0 MANIFEST
  2. +2 −3 xt/kwalitee.t
  3. +6 −9 xt/live.t
  4. +2 −3 xt/perlcritic.t
  5. +2 −3 xt/pod.t
  6. +3 −3 xt/pod_coverage.t
  7. +2 −3 xt/portability_filenames.t
  8. +9 −0 xt/vars.t
View
@@ -14,3 +14,4 @@ xt/perlcriticrc
xt/pod.t
xt/pod_coverage.t
xt/portability_filenames.t
+xt/vars.t
View
@@ -2,7 +2,6 @@ use strict;
use warnings;
use Test::More;
-eval { require Test::Kwalitee; Test::Kwalitee->import() };
-if ($@) {
+eval { require Test::Kwalitee; Test::Kwalitee->import(); 1 } or do {
plan skip_all => 'Test::Kwalitee not installed; skipping';
-}
+};
View
@@ -5,17 +5,12 @@ use Geo::Coder::Mapquest;
use LWP::UserAgent;
use Test::More;
-unless ($ENV{MAPQUEST_APIKEY}) {
- plan skip_all => 'MAPQUEST_APIKEY environment variable must be set';
-}
-else {
- plan tests => 14;
-}
+plan skip_all => 'MAPQUEST_APIKEY environment variable must be set'
+ unless $ENV{MAPQUEST_APIKEY};
my $debug = $ENV{GEO_CODER_MAPQUEST_DEBUG};
-unless ($debug) {
- diag "Set GEO_CODER_MAPQUEST_DEBUG to see request/response data";
-}
+diag "Set GEO_CODER_MAPQUEST_DEBUG to see request/response data"
+ unless $debug;
my $has_ssl = LWP::UserAgent->is_protocol_supported('https');
@@ -96,3 +91,5 @@ SKIP: {
my @locations = $geocoder->batch(\@addresses);
is(@locations, 3, 'https batch');
}
+
+done_testing;
View
@@ -2,10 +2,9 @@ use strict;
use warnings;
use Test::More;
-eval { require Test::Perl::Critic };
-if ($@) {
+eval { require Test::Perl::Critic; 1 } or do {
plan skip_all => "Test::Perl::Critic is not installed.";
-}
+};
Test::Perl::Critic->import( -profile => 'xt/perlcriticrc' );
all_critic_ok(qw( ex lib t xt ));
View
@@ -2,9 +2,8 @@ use strict;
use warnings;
use Test::More;
-eval "use Test::Pod 1.00";
-if ($@) {
+eval "use Test::Pod 1.00; 1" or do {
plan skip_all => 'Test::Pod 1.00 required for testing POD';
-}
+};
all_pod_files_ok();
View
@@ -2,8 +2,8 @@ use strict;
use warnings;
use Test::More;
-eval "use Test::Pod::Coverage 1.00";
-plan skip_all => 'Test::Pod::Coverage 1.00 required for testing POD coverage'
- if $@;
+eval "use Test::Pod::Coverage 1.00; 1" or do {
+ plan skip_all => 'Test::Pod::Coverage 1.00 is not installed.';
+};
all_pod_coverage_ok();
@@ -2,9 +2,8 @@ use strict;
use warnings;
use Test::More;
-eval "use Test::Portability::Files";
-if ($@) {
+eval "use Test::Portability::Files; 1" or do {
plan skip_all => 'Test::Portability::Files is not installed.';
-}
+};
run_tests();
View
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More;
+
+eval "use Test::Vars; 1" or do {
+ plan skip_all => 'Test::Vars is not installed.';
+};
+
+all_vars_ok();

0 comments on commit 1052f83

Please sign in to comment.