X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F003_basic_hash.t;h=8888f4b27a371ab1147123c10d0e7202e5f3b227;hb=8cf40f808c137fab5ab7438ade7308fe97d09884;hp=f0baeba9c981e1946ba11b535eba2e8990b1beed;hpb=72a418434efde640040d145e8eb3aaef3e00e538;p=gitmo%2FMooseX-AttributeHelpers.git diff --git a/t/003_basic_hash.t b/t/003_basic_hash.t index f0baeba..8888f4b 100644 --- a/t/003_basic_hash.t +++ b/t/003_basic_hash.t @@ -25,6 +25,7 @@ BEGIN { 'get' => 'get_option', 'empty' => 'has_options', 'count' => 'num_options', + 'clear' => 'clear_options', 'delete' => 'delete_option', } ); @@ -39,6 +40,7 @@ can_ok($stuff, $_) for qw[ has_options num_options delete_option + clear_options ]; ok(!$stuff->has_options, '... we have no options'); @@ -70,6 +72,10 @@ lives_ok { is($stuff->num_options, 1, '... we have 1 option(s)'); is_deeply($stuff->options, { foo => 'bar' }, '... got more options now'); +$stuff->clear_options; + +is_deeply($stuff->options, { }, "... cleared options" ); + lives_ok { Stuff->new(options => { foo => 'BAR' }); } '... good constructor params';