Author: Nicholas Bamber <nicholas@periapt.co.uk>
Subject: skipping tests that depend on the netork
Forwarded: not-needed
Last-Update: 2013-08-24
--- a/t/metamark.t
+++ b/t/metamark.t
@@ -2,6 +2,9 @@
 
 BEGIN { use_ok WWW::Shorten::Metamark };
 
+SKIP: {
+    skip 'network testing turned off by default', 6 if not $ENV{NETWORK_TESTING};
+
 my $url = 'http://dave.org.uk/';
 my $short = makeashorterlink( $url );
 ok((defined $short), 'Reasonable response');
@@ -16,3 +19,5 @@
 ok($@);
 eval { makealongerlink() };
 ok($@);
+
+}
--- a/t/tinyurl.t
+++ b/t/tinyurl.t
@@ -2,6 +2,11 @@
 
 BEGIN { use_ok WWW::Shorten::TinyURL };
 
+SKIP: {
+    skip 'network testing turned off by default', 5 if not $ENV{NETWORK_TESTING};
+
+my $url = 'http://dave.org.uk/';
+
 my $url = 'http://search.cpan.org/dist/WWW-Shorten/';
 my $return = makeashorterlink($url);
 my ($code) = $return =~ /(\w+)$/;
@@ -14,3 +19,5 @@
 ok($@, 'makeashorterlink fails with no args');
 eval { makealongerlink() };
 ok($@, 'makealongerlink fails with no args');
+
+}
