X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F003_inferred_option_type.t;h=89539265b0c840e105517bb25d75b9ffa67c9062;hb=28f95433340e9f4db1faa5a591a4855c25caeb9a;hp=5624867482e93a51101468468af808f9f15818db;hpb=f63e631037a9d743d874ae465e8b0a8d541c16c2;p=gitmo%2FMooseX-Getopt.git diff --git a/t/003_inferred_option_type.t b/t/003_inferred_option_type.t index 5624867..8953926 100644 --- a/t/003_inferred_option_type.t +++ b/t/003_inferred_option_type.t @@ -1,9 +1,8 @@ -#!/usr/bin/perl - use strict; -use warnings; +use warnings FATAL => 'all'; -use Test::More tests => 5; +use Test::More tests => 6; +use Test::NoWarnings 1.04 ':early'; BEGIN { use_ok('MooseX::Getopt'); @@ -13,21 +12,20 @@ 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($_) } @$_) }; - + has 'nums' => ( is => 'ro', isa => 'ArrayOfInts', default => sub { [0] } - ); - + ); } { @@ -35,8 +33,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'); } { @@ -44,7 +42,7 @@ 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'); }