Description: optionally disable tests requiring network access
 When NO_NETWORK_TESTING is set in the environment, the test trying
 to connect to Internet is skipped.
Bug-Debian: https://bugs.debian.org/465642
Author: Damyan Ivanov <dmn@debian.org>
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=143494
Bug: https://rt.cpan.org/Ticket/Display.html?id=143494

--- a/t/simple.t
+++ b/t/simple.t
@@ -12,7 +12,11 @@ $cache->file;
 $cache->dir;
 $cache->scratch;
 $cache->url( 'file:/' . rel2abs( $INC{'App/Cache/Test.pm'} ) );
-$cache->url('http://www.astray.com/');
+SKIP: {
+    skip "Network tests skipped because of NO_NETWORK_TESTING", 3
+        if $ENV{NO_NETWORK_TESTING};
+    $cache->url('http://www.astray.com/');
+}
 $cache->disabled;
 $cache->cleanup;
 
