X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F020_attributes%2F024_attribute_traits_parameterized.t;h=dc434cf66531e68eae5a60e9bae85cb42d47972d;hb=4d438a84f437bcb3c43a04c27823b8b431cd3f55;hp=2561b34c6fae9789d066a85733d24e6610f1d200;hpb=ccd4cff9a83030a1d8d0f94e6617145d6755c798;p=gitmo%2FMoose.git diff --git a/t/020_attributes/024_attribute_traits_parameterized.t b/t/020_attributes/024_attribute_traits_parameterized.t index 2561b34..dc434cf 100644 --- a/t/020_attributes/024_attribute_traits_parameterized.t +++ b/t/020_attributes/024_attribute_traits_parameterized.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 4; +use Test::More; { package My::Attribute::Trait; @@ -20,7 +20,7 @@ use Test::More tests => 4; has foo => ( traits => [ 'My::Attribute::Trait' => { - alias => { + -alias => { reversed_name => 'eman', }, }, @@ -36,9 +36,10 @@ use Test::More tests => 4; has foo => ( traits => [ 'My::Attribute::Trait' => { - alias => { + -alias => { reversed_name => 'reversed', }, + -excludes => 'reversed_name', }, ], is => 'bare', @@ -52,4 +53,6 @@ ok(!$attr->can('reversed'), "the method was not installed under the other class' my $other_attr = My::Other::Class->meta->get_attribute('foo'); is($other_attr->reversed, 'oof', 'the aliased method is in the attribute'); ok(!$other_attr->can('enam'), "the method was not installed under the other class' alias"); +ok(!$other_attr->can('reversed_name'), "the method was not installed under the original name when that was excluded"); +done_testing;