summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-07-09 23:38:43 -0400
committerJesse Luehrs <doy@tozt.net>2013-07-09 23:38:43 -0400
commitb30656438ee5f3a06f7d2be95484da708a0ab28c (patch)
treec63ba1acca57857c1fd301f4d6996ccb6d33443b
parent6fa99983b1e62fff1699d03d4f26556d4e797caf (diff)
downloaddist-checkconflicts-b30656438ee5f3a06f7d2be95484da708a0ab28c.tar.gz
dist-checkconflicts-b30656438ee5f3a06f7d2be95484da708a0ab28c.zip
remove Test::Warnings dep
-rw-r--r--t/conflicts.t16
1 files changed, 12 insertions, 4 deletions
diff --git a/t/conflicts.t b/t/conflicts.t
index cc9afc6..7c5dfb2 100644
--- a/t/conflicts.t
+++ b/t/conflicts.t
@@ -4,7 +4,6 @@ use warnings;
use Test::More;
use Test::Fatal;
-use Test::Warnings 0.005 'warning';
use lib 't/lib/conflicts';
{
@@ -77,7 +76,13 @@ use lib 't/lib/conflicts';
use_ok('Foo::Conflicts::Broken');
my @conflicts;
- like warning { @conflicts = Foo::Conflicts::Broken->calculate_conflicts },
+ my $warning = '';
+ {
+ local $SIG{__WARN__} = sub { $warning .= $_[0] };
+ @conflicts = Foo::Conflicts::Broken->calculate_conflicts;
+ }
+
+ like $warning,
qr/Warning: Broken did not compile/,
'Warning is issued when Broken fails to compile';
@@ -89,13 +94,16 @@ use lib 't/lib/conflicts';
"correct versions for all conflicts",
);
- like warning {
+ $warning = '';
+ {
+ local $SIG{__WARN__} = sub { $warning .= $_[0] };
like(
exception { Foo::Conflicts::Broken->check_conflicts },
qr/^Conflicts detected for Foo::Conflicts::Broken:\n Broken is version unknown, but must be greater than version 0.03\n/,
"correct conflict error",
);
- },
+ }
+ like $warning,
qr/Warning: Broken did not compile/,
'Warning is also issued when Broken fails to compile',
;