]> iEval git - www-offliberty.git/blobdiff - t/50-network.t
Make module compatible with perl 5.8.9
[www-offliberty.git] / t / 50-network.t
index b940cc8d6f45bb744679d36de3b4084fb9421b94..44d9a9854da00d94379203997902177aed7f89be 100644 (file)
@@ -1,20 +1,14 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 use strict;
 use warnings;
 
-use Test::More;
+use Test::RequiresInternet 'offliberty.com' => 80;
+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.024581 seconds and 4 git commands to generate.