X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F020_attributes%2F015_attribute_traits.t;h=eea984e8defba442abd1ccff6ce98e8d021dfab9;hb=4c98ebb0cca8d5d49d3a91eaf735f9861d00ccb0;hp=01e97414f30ca91f54262e17f06d0bdf8062c169;hpb=b6c42ac07e8d9c499b948b0f9015978242550336;p=gitmo%2FMouse.git diff --git a/t/020_attributes/015_attribute_traits.t b/t/020_attributes/015_attribute_traits.t index 01e9741..eea984e 100644 --- a/t/020_attributes/015_attribute_traits.t +++ b/t/020_attributes/015_attribute_traits.t @@ -1,16 +1,14 @@ #!/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; - - { package My::Attribute::Trait; use Mouse::Role; @@ -21,11 +19,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, - $reader, + $self->get_read_method_ref ); }; } @@ -58,7 +54,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');