From 7f427a8ad30aa6e29c92c080e7474b91b2f679fd Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Tue, 27 Jul 2010 14:40:06 -0700 Subject: Updated test to properly handle a missing dependency --- t/02-mx-m-s.t | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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; -- cgit v1.2.3