X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F020_attributes%2F015_attribute_traits.t;h=428919ed8be9d680c72654786ab32a9434df9e86;hb=c776160203d49277d4501b76ec02ef10d306193b;hp=189d212021bb30695cdfd0b8087dc799b195a571;hpb=e606ae5f848070d889472329819c95f5ba763ca3;p=gitmo%2FMoose.git diff --git a/t/020_attributes/015_attribute_traits.t b/t/020_attributes/015_attribute_traits.t index 189d212..428919e 100644 --- a/t/020_attributes/015_attribute_traits.t +++ b/t/020_attributes/015_attribute_traits.t @@ -3,24 +3,23 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More; use Test::Exception; use Test::Moose; - { package My::Attribute::Trait; use Moose::Role; - + has 'alias_to' => (is => 'ro', isa => 'Str'); has foo => ( is => "ro", default => "blah" ); - + after 'install_accessors' => sub { my $self = shift; $self->associated_class->add_method( - $self->alias_to, + $self->alias_to, $self->get_read_method_ref ); }; @@ -29,19 +28,19 @@ use Test::Moose; { package My::Class; use Moose; - + has 'bar' => ( traits => [qw/My::Attribute::Trait/], is => 'ro', isa => 'Int', alias_to => 'baz', ); - + has 'gorch' => ( is => 'ro', isa => 'Int', default => sub { 10 } - ); + ); } my $c = My::Class->new(bar => 100); @@ -64,5 +63,4 @@ ok(!$gorch_attr->does('My::Attribute::Trait'), '... gorch doesnt do the trait'); ok(!$gorch_attr->has_applied_traits, '... no traits applied'); is($gorch_attr->applied_traits, undef, '... no traits applied'); - - +done_testing;