diff options
author | Gianni Ceccarelli <dakkar@thenautilus.net> | 2011-11-14 16:10:25 +0000 |
---|---|---|
committer | Gianni Ceccarelli <dakkar@thenautilus.net> | 2011-11-14 16:10:25 +0000 |
commit | e80cdb9fec2154193c46952ccab1103b85673a5e (patch) | |
tree | 006437d725b166c9251dd156fdc9eec8caf5ac02 /t/moose-tagged.t | |
parent | more docs (diff) | |
download | data-multivalued-e80cdb9fec2154193c46952ccab1103b85673a5e.tar.gz data-multivalued-e80cdb9fec2154193c46952ccab1103b85673a5e.tar.bz2 data-multivalued-e80cdb9fec2154193c46952ccab1103b85673a5e.zip |
allow (and test) custom-named multi accessors
Diffstat (limited to 't/moose-tagged.t')
-rw-r--r-- | t/moose-tagged.t | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/t/moose-tagged.t b/t/moose-tagged.t index 6e1ac7a..2493aff 100644 --- a/t/moose-tagged.t +++ b/t/moose-tagged.t @@ -13,6 +13,8 @@ has stuff => ( default => 3, predicate => 'has_stuff', clearer => 'clear_stuff', + multi_accessor => 'stuff_tagged', + multi_predicate => 'has_stuff_tagged', ); has other => ( @@ -52,15 +54,15 @@ subtest 'with tags' => sub { my $opts = {tag=>'one'}; ok($obj->has_stuff,'has stuff'); - ok(!$obj->has_stuff_multi($opts),'not has stuff tagged'); + ok(!$obj->has_stuff_tagged($opts),'not has stuff tagged'); ok(!$obj->has_other,'not has other'); ok(!$obj->has_other_multi($opts),'not has other tagged'); - $obj->stuff_multi($opts,7); + $obj->stuff_tagged($opts,7); $obj->other_multi($opts,'foo'); is($obj->stuff,3,'default'); - is($obj->stuff_multi($opts),7,'stuff tagged'); + is($obj->stuff_tagged($opts),7,'stuff tagged'); is($obj->other_multi($opts),'foo','other tagged'); }; |