summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dist.ini3
-rw-r--r--t/01-basic.t11
-rw-r--r--t/02-read-write.t11
-rw-r--r--t/03-write-to-termcast.t9
4 files changed, 17 insertions, 17 deletions
diff --git a/dist.ini b/dist.ini
index 76a24f2..127a83a 100644
--- a/dist.ini
+++ b/dist.ini
@@ -14,3 +14,6 @@ Try::Tiny = 0
MooseX::Getopt = 0
Scope::Guard = 0
JSON = 0
+
+[Prereqs / TestRequires]
+Test::Requires = 0
diff --git a/t/01-basic.t b/t/01-basic.t
index f353c42..48bea2c 100644
--- a/t/01-basic.t
+++ b/t/01-basic.t
@@ -2,13 +2,10 @@
use strict;
use warnings;
use Test::More;
-use App::Termcast;
+use Test::Requires 'Test::TCP';
use IO::Pty::Easy;
-BEGIN {
- eval "use Test::TCP;";
- plan skip_all => "Test::TCP is required for this test" if $@;
- plan tests => 3;
-}
+
+use App::Termcast;
test_tcp(
client => sub {
@@ -43,3 +40,5 @@ EOF
is($output, "foo", 'sent the right data to the server');
},
);
+
+done_testing;
diff --git a/t/02-read-write.t b/t/02-read-write.t
index 5fd6baa..a970ddd 100644
--- a/t/02-read-write.t
+++ b/t/02-read-write.t
@@ -2,13 +2,10 @@
use strict;
use warnings;
use Test::More;
-use App::Termcast;
+use Test::Requires 'Test::TCP';
use IO::Pty::Easy;
-BEGIN {
- eval "use Test::TCP;";
- plan skip_all => "Test::TCP is required for this test" if $@;
- plan tests => 5;
-}
+
+use App::Termcast;
test_tcp(
client => sub {
@@ -58,3 +55,5 @@ EOF
'sent the right data to the server');
},
);
+
+done_testing;
diff --git a/t/03-write-to-termcast.t b/t/03-write-to-termcast.t
index 1e505f2..6e65e82 100644
--- a/t/03-write-to-termcast.t
+++ b/t/03-write-to-termcast.t
@@ -2,12 +2,9 @@
use strict;
use warnings;
use Test::More;
+use Test::Requires 'Test::TCP';
+
use App::Termcast;
-BEGIN {
- eval "use Test::TCP;";
- plan skip_all => "Test::TCP is required for this test" if $@;
- plan tests => 3;
-}
test_tcp(
client => sub {
@@ -38,3 +35,5 @@ test_tcp(
is($buf, 'foo', 'wrote correctly');
},
);
+
+done_testing;