]> iEval git - www-offliberty.git/commitdiff
Use LWP::Online in network test
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 4 May 2014 06:08:57 +0000 (09:08 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 4 May 2014 06:08:57 +0000 (09:08 +0300)
Makefile.PL
t/50-network.t

index 7f399966758b27cf2a26c9519089795216a4bb01..36089b8cf904c55f6ac8218f82a6fe74971a5dec 100644 (file)
@@ -9,6 +9,9 @@ WriteMakefile(
        EXE_FILES        => ['off'],
        MIN_PERL_VERSION => '5.14.0',
        LICENSE          => 'perl',
+       BUILD_REQUIRES    => {
+               qw/LWP::Online 0/,
+       },
        SIGN             => 1,
        PREREQ_PM        => {
                qw/Getopt::Long      0
index 20b07e63ad55a7541b799bb035273a416efe1428..ef9b682f19aedaa0850f0fb47399d2d698939029 100644 (file)
@@ -2,19 +2,13 @@
 use strict;
 use warnings;
 
-use Test::More;
+use LWP::Online ':skip_all';
+use Test::More tests => 2;
 use WWW::Offliberty qw/off/;
 
-if ($ENV{NETWORK_TEST}) {
-       plan tests => 2;
+my @results;
+@results = off "http://youtube.com/watch?v=Tj75Arhq5ho";
+is @results, 1, 'youtube';
 
-       my @results;
-
-       @results = off "http://youtube.com/watch?v=Tj75Arhq5ho";
-       is @results, 1, 'youtube';
-
-       @results = off "http://youtube.com/watch?v=Tj75Arhq5ho", video_file => 1;
-       is @results, 2, 'youtube, video_file => 1';
-} else {
-       plan skip_all => '$ENV{NETWORK_TEST} not true';
-}
+@results = off "http://youtube.com/watch?v=Tj75Arhq5ho", video_file => 1;
+is @results, 2, 'youtube, video_file => 1';
This page took 0.025067 seconds and 4 git commands to generate.