X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F019-handles.t;h=5f4e51f0f427d21a62e172bd729255bd95af4edb;hb=6fbbcaf48a79f9cb43d436dba0b508f2607ac0ae;hp=e48511a18b5e2b926f34ae38ad01c6bd9a44907b;hpb=3084f7a95178f560a7a973867a3b1ab4934b2932;p=gitmo%2FMouse.git diff --git a/t/019-handles.t b/t/019-handles.t index e48511a..5f4e51f 100644 --- a/t/019-handles.t +++ b/t/019-handles.t @@ -1,8 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 24; -use Test::Exception; +use Test::More tests => 20; do { package Person; @@ -38,29 +37,41 @@ do { handles => [qw/name age/], ); - ::throws_ok { - has error => ( - handles => "string", - ); - } qr/Unable to canonicalize the 'handles' option with string/; - - ::throws_ok { - has error2 => ( - handles => \"ref_to_string", - ); - } qr/Unable to canonicalize the 'handles' option with SCALAR\(\w+\)/; - - ::throws_ok { - has error3 => ( - handles => qr/regex/, - ); - } qr/Unable to canonicalize the 'handles' option with \(\?-xism:regex\)/; - - ::throws_ok { - has error4 => ( - handles => sub { "code" }, - ); - } qr/Unable to canonicalize the 'handles' option with CODE\(\w+\)/; + TODO: { + local $::TODO = "handles => role"; + eval { + has error => ( + handles => "string", + ); + }; + } + + TODO: { + local $::TODO = "handles => \\str"; + eval { + has error2 => ( + handles => \"ref_to_string", + ); + }; + } + + TODO: { + local $::TODO = "handles => qr/re/"; + eval { + has error3 => ( + handles => qr/regex/, + ); + }; + } + + TODO: { + local $::TODO = "handles => sub { code }"; + eval { + has error4 => ( + handles => sub { "code" }, + ); + }; + } }; can_ok(Class => qw(person has_person person_name person_age name age quid));