From a4d7395b37a102f3ab4faed4d5a6e7cdc0d8a122 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 20 Jun 2013 16:53:50 -0400 Subject: use Test::Warnings instead of Test::Warn --- t/02-conflicts.t | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 't/02-conflicts.t') 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', ; -- cgit v1.2.3-54-g00ecf