X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F020_attributes%2F015_attribute_traits.t;h=675d22ceab903407249d67254cfb010699e6b858;hb=013ee5f0c0ce5afa1fea9d45bd14bd8f8bfd67f4;hp=9d89cf5c631d4248eb927db0d1b1e9c601539d96;hpb=2a464664052830d5fad036569d5ccb3964c7f592;p=gitmo%2FMouse.git diff --git a/t/020_attributes/015_attribute_traits.t b/t/020_attributes/015_attribute_traits.t index 9d89cf5..675d22c 100644 --- a/t/020_attributes/015_attribute_traits.t +++ b/t/020_attributes/015_attribute_traits.t @@ -1,15 +1,15 @@ #!/usr/bin/perl -use lib 't/lib'; use strict; use warnings; -use Test::More tests => 12; +use lib 't/lib'; +use Test::More tests => 12; use Test::Exception; use Test::Mouse; - +use MooseCompat; { package My::Attribute::Trait; @@ -21,11 +21,9 @@ use Test::Mouse; after 'install_accessors' => sub { my $self = shift; - my $reader = $self->get_read_method_ref; - $self->associated_class->add_method( $self->alias_to, - sub { shift->$reader(@_) }, + $self->get_read_method_ref ); }; } @@ -58,7 +56,6 @@ can_ok($c, 'baz'); is($c->baz, 100, '... got the right value for baz'); my $bar_attr = $c->meta->get_attribute('bar'); - does_ok($bar_attr, 'My::Attribute::Trait'); ok($bar_attr->has_applied_traits, '... got the applied traits'); is_deeply($bar_attr->applied_traits, [qw/My::Attribute::Trait/], '... got the applied traits');