From: Shawn M Moore Date: Mon, 10 Nov 2008 22:23:22 +0000 (+0000) Subject: Add failing tests for AttributeHelpers + ClassAttribute X-Git-Tag: 0.07~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=29c02565c653c5e3d01bfd96c28cbf3a70403b67;p=gitmo%2FMooseX-ClassAttribute.git Add failing tests for AttributeHelpers + ClassAttribute --- diff --git a/t/04-with-attribute-helpers.t b/t/04-with-attribute-helpers.t new file mode 100644 index 0000000..e1cf84a --- /dev/null +++ b/t/04-with-attribute-helpers.t @@ -0,0 +1,23 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::More tests => 2; + +do { + package MyClass; + use MooseX::ClassAttribute; + use MooseX::AttributeHelpers; + + class_has counter => ( + metaclass => 'Counter', + is => 'ro', + provides => { + inc => 'inc_counter', + }, + ); +}; + +is(MyClass->counter, 0); +MyClass->inc_counter; +is(MyClass->counter, 1); +