X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Getopt.git;a=blobdiff_plain;f=t%2F102_basic_basic.t;h=49042ea89c5eceef4bf7b4f9cf80db46bc056d13;hp=631550a59106d4ad820aca8524f5a2b8425817ee;hb=aec092482d5b90b8279e4a5f92165868a78ddf32;hpb=da7b9880cfa75cdc3f3a4903e9ed7bfc86b534a3 diff --git a/t/102_basic_basic.t b/t/102_basic_basic.t index 631550a..49042ea 100644 --- a/t/102_basic_basic.t +++ b/t/102_basic_basic.t @@ -1,7 +1,9 @@ use strict; -use warnings; +use warnings FATAL => 'all'; -use Test::More tests => 69; +use Test::More tests => 70; +use Test::Moose; +use Test::NoWarnings 1.04 ':early'; BEGIN { use_ok('MooseX::Getopt::Basic'); @@ -14,7 +16,7 @@ BEGIN { with 'MooseX::Getopt::Basic'; has 'data' => ( - metaclass => 'MooseX::Getopt::Meta::Attribute', + traits => ['Getopt'], is => 'ro', isa => 'Str', default => 'file.dat', @@ -22,7 +24,7 @@ BEGIN { ); has 'cow' => ( - metaclass => 'Getopt', + traits => ['Getopt'], is => 'ro', isa => 'Str', default => 'moo', @@ -30,7 +32,7 @@ BEGIN { ); has 'horse' => ( - metaclass => 'MooseX::Getopt::Meta::Attribute', + traits => ['Getopt'], is => 'ro', isa => 'Str', default => 'bray', @@ -68,19 +70,18 @@ BEGIN { ); has '_private_stuff_cmdline' => ( - metaclass => 'MooseX::Getopt::Meta::Attribute', + traits => ['Getopt'], is => 'ro', isa => 'Int', default => 832, cmd_flag => 'p', ); - } foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { my $attr = App->meta->get_attribute($attr_name); isa_ok($attr, 'Moose::Meta::Attribute'); - isa_ok($attr, 'MooseX::Getopt::Meta::Attribute'); + does_ok($attr, 'MooseX::Getopt::Meta::Attribute::Trait'); can_ok($attr, 'cmd_flag'); can_ok($attr, 'cmd_aliases'); }