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=refs%2Ftags%2F0.98;hp=c85f1877e031d0f0920df714b8b3e70ad51c1c8d;hpb=59f5bbde66d61d15b684be88d138fd798ba851d0;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 c85f187..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,11 +20,12 @@ use Test::More tests => 4; has foo => ( traits => [ 'My::Attribute::Trait' => { - alias => { + -alias => { reversed_name => 'eman', }, }, ], + is => 'bare', ); } @@ -35,11 +36,13 @@ use Test::More tests => 4; has foo => ( traits => [ 'My::Attribute::Trait' => { - alias => { + -alias => { reversed_name => 'reversed', }, + -excludes => 'reversed_name', }, ], + is => 'bare', ); } @@ -50,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;