X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F003_basic_hash.t;fp=t%2F003_basic_hash.t;h=b9dfbc0f18688630a33c55ddf08b52c2c72c5e95;hb=c0dcad02f9924c58c3a7c07a076d057e4f276d93;hp=7b1b7794e31911eaa11c502c01990b369b2e8955;hpb=771c8f215b1a831b7777770566d8ac52f3e785c7;p=gitmo%2FMooseX-AttributeHelpers.git diff --git a/t/003_basic_hash.t b/t/003_basic_hash.t index 7b1b779..b9dfbc0 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 => 40; +use Test::More tests => 42; use Test::Exception; BEGIN { @@ -28,6 +28,7 @@ BEGIN { 'clear' => 'clear_options', 'delete' => 'delete_option', 'exists' => 'has_option', + 'defined'=> 'is_defined' }, curries => { 'set' => { @@ -47,6 +48,7 @@ can_ok($stuff, $_) for qw[ num_options delete_option clear_options + is_defined has_option ]; @@ -60,6 +62,8 @@ lives_ok { $stuff->set_option(foo => 'bar'); } '... set the option okay'; +ok($stuff->is_defined('foo'), '... foo is defined'); + ok($stuff->has_options, '... we have options'); is($stuff->num_options, 1, '... we have 1 option(s)'); ok($stuff->has_option('foo'), '... we have a foo option'); @@ -134,6 +138,7 @@ is_deeply($options->provides, { 'count' => 'num_options', 'clear' => 'clear_options', 'delete' => 'delete_option', + 'defined'=> 'is_defined', 'exists' => 'has_option', }, '... got the right provies mapping');