Skip to content

Commit

Permalink
attribute trait validation now resolves aliases correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
rsrchboy committed Jul 12, 2015
1 parent ea47022 commit ed8c2bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Test/Moose/More.pm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use Test::More;
use Test::Moose 'with_immutable';
use Scalar::Util 'blessed';
use Syntax::Keyword::Junction 'any';
use Moose::Util 'does_role', 'find_meta';
use Moose::Util 'resolve_metatrait_alias', 'does_role', 'find_meta';
use Moose::Util::TypeConstraints;
use Data::OptList;

Expand Down Expand Up @@ -700,6 +700,9 @@ sub _validate_attribute {
sort keys %opts
;

$thing_opts{does} = [ map { resolve_metatrait_alias(Attribute => $_) } @{$thing_opts{does}} ]
if $thing_opts{does};

### %thing_opts
validate_class $att => %thing_opts
if keys %thing_opts;
Expand Down

0 comments on commit ed8c2bf

Please sign in to comment.