X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F020_attributes%2F005_attribute_does.t;h=b4fec659c1b6facfd83c349689aa0a2199a1b5a8;hb=HEAD;hp=a895bdb787ce6c43dcd37f44dbda6f4df335e8a5;hpb=4c98ebb0cca8d5d49d3a91eaf735f9861d00ccb0;p=gitmo%2FMouse.git diff --git a/t/020_attributes/005_attribute_does.t b/t/020_attributes/005_attribute_does.t index a895bdb..b4fec65 100644 --- a/t/020_attributes/005_attribute_does.t +++ b/t/020_attributes/005_attribute_does.t @@ -1,13 +1,15 @@ #!/usr/bin/perl +# This is automatically generated by author/import-moose-test.pl. +# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!! +use t::lib::MooseCompat; use strict; use warnings; -use Test::More tests => 9; +use Test::More; use Test::Exception; - { package Foo::Role; use Mouse::Role; @@ -19,9 +21,14 @@ use Test::Exception; has 'bar' => (is => 'rw', does => 'Bar::Role'); has 'baz' => ( is => 'rw', - does => 'Bar::Role' + does => role_type('Bar::Role') ); + package Foo::Class; + use Mouse; + + with 'Foo::Role'; + package Bar::Role; use Mouse::Role; @@ -30,16 +37,10 @@ use Test::Exception; # since the isa() check will imply the does() check has 'foo' => (is => 'rw', isa => 'Foo::Class', does => 'Foo::Role'); - package Foo::Class; - use Mouse; - - with 'Foo::Role'; - package Bar::Class; use Mouse; with 'Bar::Role'; - } my $foo = Foo::Class->new; @@ -74,11 +75,8 @@ lives_ok { { package Baz::Class; - use Test::More; use Mouse; - local $TODO = 'setting both isa and does'; - # if isa and does appear together, then see if Class->does(Role) # if it does not,.. we have a conflict... so we die loudly ::dies_ok { @@ -94,11 +92,8 @@ lives_ok { sub bling { 'Bling::bling' } package Bling::Bling; - use Test::More; use Mouse; - local $TODO = 'setting both isa and does'; - # if isa and does appear together, then see if Class->does(Role) # if it does not,.. we have a conflict... so we die loudly ::dies_ok { @@ -106,5 +101,4 @@ lives_ok { } '... cannot have a isa() which is cannot does()'; } - - +done_testing;