Skip to content

Commit

Permalink
Use HTTP::Online to check for online access when running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrjones committed Nov 11, 2012
1 parent 789a4dc commit 9a3348f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
1 change: 1 addition & 0 deletions Changes
@@ -1,5 +1,6 @@
{{$NEXT}}
Add LWP::Protocol::https as dependency.
Use HTTP::Online to test for internet connection when running tests.

1.120730 2012-03-13 12:41:33 Europe/London
Need at least Net::Ping 2.33 for testing.
Expand Down
12 changes: 2 additions & 10 deletions t/15_live.t
Expand Up @@ -5,16 +5,8 @@ use warnings;

use Test::WWW::Mechanize;
use Net::Ping 2.33;
use Test::More;

my $p = Net::Ping->new( "syn", 2 );
$p->port_number( getservbyname( "http", "tcp" ) );
unless ( $p->ping('gamercard.xbox.com') ) {
plan skip_all => 'Can\t find gamercard.xbox.com for live tests';
}
else {
plan tests => 17;
}
use Test::More tests => 17;
use HTTP::Online ':skip_all';

use WWW::XBoxLive;

Expand Down

0 comments on commit 9a3348f

Please sign in to comment.