From: Graham Knop Date: Mon, 15 Jul 2013 03:56:28 +0000 (-0400) Subject: skip test using around unless CMM is available X-Git-Tag: v1.003001~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7c2577a4c1ffd1bb70d4b2eedc2ed21132c2804c;p=gitmo%2FRole-Tiny.git skip test using around unless CMM is available --- diff --git a/Changes b/Changes index 0d47586..410fce8 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ + - fix test accidentally requiring Class::Method::Modifiers + 1.003000 - 2013-07-14 - allow composing roles simultaneously that mutually require each other (RT#82711) diff --git a/t/subclass.t b/t/subclass.t index e1fd793..88dd111 100644 --- a/t/subclass.t +++ b/t/subclass.t @@ -96,13 +96,16 @@ ok eval { RoleExtension3->create_class_with_roles('Class2', 'Role3') }, ok !eval { RoleExtension3->create_class_with_roles('Class2', 'Role4'); }, 'requires checked properly during create_class_with_roles'; -{ +SKIP: { + skip "Class::Method::Modifiers not installed or too old", 1 + unless eval "use Class::Method::Modifiers 1.05; 1"; package Role5; $INC{'Role5.pm'} = __FILE__; use Role::Tiny; around extra_sub2 => sub { my $orig = shift; $orig->(@_); }; + + ::ok !eval { RoleExtension3->create_class_with_roles('Class3', 'Role4'); }, + 'requires checked properly during create_class_with_roles'; } -ok !eval { RoleExtension3->create_class_with_roles('Class3', 'Role4'); }, - 'requires checked properly during create_class_with_roles'; done_testing;