diff options
author | Karen Etheridge <karen@etheridge.ca> | 2010-07-27 14:40:06 -0700 |
---|---|---|
committer | Karen Etheridge <karen@etheridge.ca> | 2010-07-27 14:40:06 -0700 |
commit | 7f427a8ad30aa6e29c92c080e7474b91b2f679fd (patch) | |
tree | bb8a32edc58950690fae483dfcfb7304cbe99b97 | |
parent | df491f72df4e5e7d9edda466a9408528c843ba33 (diff) | |
download | mx-alwayscoerce-7f427a8ad30aa6e29c92c080e7474b91b2f679fd.tar.gz mx-alwayscoerce-7f427a8ad30aa6e29c92c080e7474b91b2f679fd.zip |
Updated test to properly handle a missing dependency
-rw-r--r-- | t/02-mx-m-s.t | 11 |
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; |