aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Etheridge <karen@etheridge.ca>2010-07-27 14:40:06 -0700
committerKaren Etheridge <karen@etheridge.ca>2010-07-27 14:40:06 -0700
commit7f427a8ad30aa6e29c92c080e7474b91b2f679fd (patch)
treebb8a32edc58950690fae483dfcfb7304cbe99b97
parentdf491f72df4e5e7d9edda466a9408528c843ba33 (diff)
downloadmx-alwayscoerce-7f427a8ad30aa6e29c92c080e7474b91b2f679fd.tar.gz
mx-alwayscoerce-7f427a8ad30aa6e29c92c080e7474b91b2f679fd.zip
Updated test to properly handle a missing dependency
-rw-r--r--t/02-mx-m-s.t11
1 files 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;