summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGraham Knop <haarg@haarg.org>2013-06-20 16:53:50 -0400
committerKaren Etheridge <ether@cpan.org>2013-06-21 21:27:01 -0700
commita4d7395b37a102f3ab4faed4d5a6e7cdc0d8a122 (patch)
tree5c6fd6139cf9b5c262d6761dad3b82e992f81975
parent964ad25dbd2c5e95d8ccc58616b8db25b4d52fa6 (diff)
downloaddist-checkconflicts-a4d7395b37a102f3ab4faed4d5a6e7cdc0d8a122.tar.gz
dist-checkconflicts-a4d7395b37a102f3ab4faed4d5a6e7cdc0d8a122.zip
use Test::Warnings instead of Test::Warn
-rw-r--r--t/02-conflicts.t9
1 files changed, 4 insertions, 5 deletions
diff --git a/t/02-conflicts.t b/t/02-conflicts.t
index a97b387..e1645d5 100644
--- a/t/02-conflicts.t
+++ b/t/02-conflicts.t
@@ -4,8 +4,7 @@ use warnings;
use Test::More;
use Test::Fatal;
-use Test::Warn;
-use Test::Warnings;
+use Test::Warnings 'warning';
use lib 't/lib/02';
{
@@ -78,7 +77,7 @@ use lib 't/lib/02';
use_ok('Foo::Conflicts::Broken');
my @conflicts;
- warning_like { @conflicts = Foo::Conflicts::Broken->calculate_conflicts }
+ like warning { @conflicts = Foo::Conflicts::Broken->calculate_conflicts },
qr/Warning: Broken did not compile/,
'Warning is issued when Broken fails to compile';
@@ -90,13 +89,13 @@ use lib 't/lib/02';
"correct versions for all conflicts",
);
- warning_like {
+ like warning {
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",
);
- }
+ },
qr/Warning: Broken did not compile/,
'Warning is also issued when Broken fails to compile',
;