From: Shawn M Moore Date: Sun, 25 May 2008 01:07:04 +0000 (+0000) Subject: Test the meta in t/004_basic_number X-Git-Tag: 0.16~61 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f053fc2f31ddc2bc96016b2b961283c00add6a96;p=gitmo%2FMooseX-AttributeHelpers.git Test the meta in t/004_basic_number --- diff --git a/t/004_basic_number.t b/t/004_basic_number.t index 0ca838e..2cf5fab 100644 --- a/t/004_basic_number.t +++ b/t/004_basic_number.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 18; +use Test::More tests => 20; BEGIN { use_ok('MooseX::AttributeHelpers'); @@ -73,4 +73,20 @@ $real->set(-1); $real->abs; -is $real->integer, 1, 'abs 1' \ No newline at end of file +is $real->integer, 1, 'abs 1'; + +## test the meta + +my $attr = $real->meta->get_attribute('integer'); +isa_ok($attr, 'MooseX::AttributeHelpers::Number'); + +is_deeply($attr->provides, { + set => 'set', + add => 'add', + sub => 'sub', + mul => 'mul', + div => 'div', + mod => 'mod', + abs => 'abs', +}, '... got the right provides mapping'); +