X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F102_basic_basic.t;h=10d5bd3bca05b8130a3be4a0aa3dcf1607f997d3;hb=986fb4690bc00c860b1f728b986e39b412100854;hp=daf32f3a0baf2e8dc6dde65a3d63914b96476aff;hpb=2557b52647dda5b9e090b324d950d4a55db74bae;p=gitmo%2FMooseX-Getopt.git diff --git a/t/102_basic_basic.t b/t/102_basic_basic.t index daf32f3..10d5bd3 100644 --- a/t/102_basic_basic.t +++ b/t/102_basic_basic.t @@ -1,9 +1,9 @@ -#!/usr/bin/perl - use strict; -use warnings; +use warnings FATAL => 'all'; -use Test::More tests => 69; +use Test::More tests => 70; +use Test::Moose; +use Test::Warnings; BEGIN { use_ok('MooseX::Getopt::Basic'); @@ -16,7 +16,7 @@ BEGIN { with 'MooseX::Getopt::Basic'; has 'data' => ( - metaclass => 'MooseX::Getopt::Meta::Attribute', + traits => ['Getopt'], is => 'ro', isa => 'Str', default => 'file.dat', @@ -24,7 +24,7 @@ BEGIN { ); has 'cow' => ( - metaclass => 'Getopt', + traits => ['Getopt'], is => 'ro', isa => 'Str', default => 'moo', @@ -32,7 +32,7 @@ BEGIN { ); has 'horse' => ( - metaclass => 'MooseX::Getopt::Meta::Attribute', + traits => ['Getopt'], is => 'ro', isa => 'Str', default => 'bray', @@ -70,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'); }