use strict;
use warnings;
-use Test::More tests => 18;
+use Test::More tests => 20;
BEGIN {
use_ok('MooseX::AttributeHelpers');
$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');
+
use strict;
use warnings;
-use Test::More tests => 18;
+use Test::More tests => 20;
use Test::Exception;
BEGIN {
is($stuff->get_count_for('bar'), 5, '... got words now');
is($stuff->get_count_for('baz'), 11, '... got words now');
+## test the meta
+my $words = $stuff->meta->get_attribute('word_histogram');
+isa_ok($words, 'MooseX::AttributeHelpers::Collection::Bag');
+
+is_deeply($words->provides, {
+ 'add' => 'add_word',
+ 'get' => 'get_count_for',
+ 'empty' => 'has_any_words',
+ 'count' => 'num_words',
+ 'delete' => 'delete_word',
+}, '... got the right provides mapping');