X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F05-with-attribute-helpers-backcompat.t;h=b03213c8891d77523901d9e22c0f1b2728079abc;hb=6bf506c8c842353e50f0c21e423227f6695b4d92;hp=96cce5b36f2c9c8dbba91c3e0d59b072aec02b7a;hpb=3272340d933b46c2b98be10b1923170739ce3c8a;p=gitmo%2FMooseX-ClassAttribute.git diff --git a/t/05-with-attribute-helpers-backcompat.t b/t/05-with-attribute-helpers-backcompat.t index 96cce5b..b03213c 100644 --- a/t/05-with-attribute-helpers-backcompat.t +++ b/t/05-with-attribute-helpers-backcompat.t @@ -1,13 +1,12 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More; -use Test::Requires { - 'MooseX::AttributeHelpers' => 0.23, # skip all if not installed +use Test::Requires 0.05 { + 'MooseX::AttributeHelpers' => 0.23, }; - { package MyClass; @@ -15,12 +14,13 @@ use Test::Requires { use MooseX::ClassAttribute; use MooseX::AttributeHelpers; - class_has counter => - ( metaclass => 'Counter', - is => 'ro', - provides => { inc => 'inc_counter', - }, - ); + class_has counter => ( + metaclass => 'Counter', + is => 'ro', + provides => { + inc => 'inc_counter', + }, + ); } is( MyClass->counter(), 0 ); @@ -28,3 +28,4 @@ is( MyClass->counter(), 0 ); MyClass->inc_counter(); is( MyClass->counter(), 1 ); +done_testing();