X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F003_basic_hash.t;h=5f66998180dee7286d9d185e399055212fd81125;hb=2a6837a2c705ec26b8dad7f49c2342f7c220cedb;hp=79ca4cdedb778f17b5b719830f1906c6c3d890e5;hpb=671d0d24bba344c05d06cc0950a73b4e46fc668c;p=gitmo%2FMooseX-AttributeHelpers.git diff --git a/t/003_basic_hash.t b/t/003_basic_hash.t index 79ca4cd..5f66998 100644 --- a/t/003_basic_hash.t +++ b/t/003_basic_hash.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 45; +use Test::More tests => 48; use Test::Exception; BEGIN { @@ -131,6 +131,21 @@ dies_ok { Stuff->new(options => { foo => [] }); } '... bad constructor params'; +dies_ok { + my $stuff = Stuff->new; + $stuff->option_accessor(); +} '... accessor dies on 0 args'; + +dies_ok { + my $stuff = Stuff->new; + $stuff->option_accessor(1 => 2, 3); +} '... accessor dies on 3 args'; + +dies_ok { + my $stuff = Stuff->new; + $stuff->option_accessor(1 => 2, 3 => 4); +} '... accessor dies on 4 args'; + ## test the meta my $options = $stuff->meta->get_attribute('options');