X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Getopt.git;a=blobdiff_plain;f=t%2F002_custom_option_type.t;fp=t%2F002_custom_option_type.t;h=890477d31b979681ded5a940a5860d936a6ea25e;hp=fc4625051984f0dc2afaff64af9cb38f2b82aef9;hb=2557b52647dda5b9e090b324d950d4a55db74bae;hpb=d03999d67f2821eaeb230268318be45d3fb11c59 diff --git a/t/002_custom_option_type.t b/t/002_custom_option_type.t index fc46250..890477d 100644 --- a/t/002_custom_option_type.t +++ b/t/002_custom_option_type.t @@ -13,25 +13,25 @@ BEGIN { package App; use Moose; use Moose::Util::TypeConstraints; - + use Scalar::Util 'looks_like_number'; - + with 'MooseX::Getopt'; subtype 'ArrayOfInts' => as 'ArrayRef' => where { scalar (grep { looks_like_number($_) } @$_) }; - + MooseX::Getopt::OptionTypeMap->add_option_type_to_map( 'ArrayOfInts' => '=i@' ); - + has 'nums' => ( is => 'ro', isa => 'ArrayOfInts', default => sub { [0] } - ); - + ); + } { @@ -39,8 +39,8 @@ BEGIN { my $app = App->new_with_options; isa_ok($app, 'App'); - - is_deeply($app->nums, [0], '... nums is [0] as expected'); + + is_deeply($app->nums, [0], '... nums is [0] as expected'); } { @@ -48,8 +48,8 @@ BEGIN { my $app = App->new_with_options; isa_ok($app, 'App'); - - is_deeply($app->nums, [3, 5], '... nums is [3, 5] as expected'); + + is_deeply($app->nums, [3, 5], '... nums is [3, 5] as expected'); } # Make sure it really used our =i@, instead of falling back