summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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',
;