use warnings;
use Test::More tests => 70;
+use Test::Moose;
use Test::NoWarnings 1.04 ':early';
BEGIN {
with 'MooseX::Getopt';
has 'data' => (
- metaclass => 'MooseX::Getopt::Meta::Attribute',
+ metaclass => 'Getopt',
is => 'ro',
isa => 'Str',
default => 'file.dat',
);
has 'horse' => (
- metaclass => 'MooseX::Getopt::Meta::Attribute',
+ traits => ['Getopt'],
is => 'ro',
isa => 'Str',
default => 'bray',
);
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');
+ if ($attr_name eq 'data' or $attr_name eq 'cow')
+ {
+ isa_ok($attr, 'MooseX::Getopt::Meta::Attribute');
+ }
+ else
+ {
+ does_ok($attr, 'MooseX::Getopt::Meta::Attribute::Trait');
+ }
can_ok($attr, 'cmd_flag');
can_ok($attr, 'cmd_aliases');
}