From: Karen Etheridge Date: Tue, 27 Jul 2010 21:40:06 +0000 (-0700) Subject: Updated test to properly handle a missing dependency X-Git-Tag: 0.06~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7f427a8ad30aa6e29c92c080e7474b91b2f679fd;p=gitmo%2FMooseX-AlwaysCoerce.git Updated test to properly handle a missing dependency --- diff --git a/t/02-mx-m-s.t b/t/02-mx-m-s.t index 3501d34..856e9ba 100644 --- a/t/02-mx-m-s.t +++ b/t/02-mx-m-s.t @@ -5,10 +5,13 @@ use warnings; use Test::More; use Test::Exception; -eval { require MooseX::Method::Signatures }; -plan skip_all => "No MooseX::Method::Signatures" if $@; - -plan tests => 2; +BEGIN { + if (eval { require MooseX::Method::Signatures }) { + plan tests => 2; + } else { + plan skip_all => 'This test needs MooseX::Method::Signatures'; + } +} { package MyClass;