From: Shawn M Moore Date: Sun, 28 Sep 2008 16:26:03 +0000 (+0000) Subject: Skip some tests if we don't have Class::Method::Modifiers X-Git-Tag: 0.19~193 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c13900f12aef41dec5bc9661cb720ccb709c9a5b;p=gitmo%2FMouse.git Skip some tests if we don't have Class::Method::Modifiers --- diff --git a/t/027-modifiers.t b/t/027-modifiers.t index a12da33..84e3930 100644 --- a/t/027-modifiers.t +++ b/t/027-modifiers.t @@ -1,7 +1,16 @@ #!perl -T use strict; use warnings; -use Test::More tests => 1; + +use Test::More; +BEGIN { + if (eval "require Class::Method::Modifiers; 1") { + plan tests => 1; + } + else { + plan skip_all => "Class::Method::Modifiers required for this test"; + } +} my @seen; my @expected = ("before 4", diff --git a/t/403-method-modifiers.t b/t/403-method-modifiers.t index 838adee..141534b 100644 --- a/t/403-method-modifiers.t +++ b/t/403-method-modifiers.t @@ -1,7 +1,15 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 4; +use Test::More; +BEGIN { + if (eval "require Class::Method::Modifiers; 1") { + plan tests => 4; + } + else { + plan skip_all => "Class::Method::Modifiers required for this test"; + } +} use Mouse::Util ':test'; my @calls;