From 70a520fa77671dd3ef1cdd51b21044b65a446d22 Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Fri, 3 May 2013 12:44:34 -0700 Subject: add tests to confirm there are no unexpected warnings either --- t/02-conflicts.t | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/t/02-conflicts.t b/t/02-conflicts.t index f59777f..a97b387 100644 --- a/t/02-conflicts.t +++ b/t/02-conflicts.t @@ -1,9 +1,11 @@ #!/usr/bin/env perl use strict; use warnings; + use Test::More; use Test::Fatal; use Test::Warn; +use Test::Warnings; use lib 't/lib/02'; { @@ -88,11 +90,16 @@ use lib 't/lib/02'; "correct versions for all conflicts", ); - is( - exception { Foo::Conflicts::Broken->check_conflicts }, - "Conflicts detected for Foo::Conflicts::Broken:\n Broken is version unknown, but must be greater than version 0.03\n", - "correct conflict error" - ); + warning_like { + 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', + ; } done_testing; -- cgit v1.2.3