From: Dave Rolsky Date: Wed, 27 Aug 2008 23:41:57 +0000 (+0000) Subject: More tests that won't pass until _fix_metaclass_incompatibility is much smarter. X-Git-Tag: 0.55_02~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8ad91ed8c120461a17e9b78c553dd27be82ebe04;p=gitmo%2FMoose.git More tests that won't pass until _fix_metaclass_incompatibility is much smarter. --- diff --git a/t/050_metaclasses/013_metaclass_traits.t b/t/050_metaclasses/013_metaclass_traits.t index a74fd3c..9a32641 100644 --- a/t/050_metaclasses/013_metaclass_traits.t +++ b/t/050_metaclasses/013_metaclass_traits.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 23; +use Test::More tests => 28; use Test::Exception; { @@ -170,3 +170,24 @@ is( Role::Foo->meta()->simple(), 5, like( $@, qr/does not have an init_meta/, '... and error provides a useful explanation' ); } + +SKIP: +{ + skip 'This will blow up until Moose::Meta::Class->_fix_metaclass_incompatibility understands roles', 5; +{ + package Foo::Subclass; + + use Moose -traits => [ 'My::SimpleTrait3' ]; + + extends 'Foo'; +} + +can_ok( Foo::Subclass->meta(), 'simple' ); +is( Foo::Subclass->meta()->simple(), 5, + 'Foo::Subclass->meta()->simple() returns expected value' ); +is( Foo::Subclass->meta()->simple2(), 55, + 'Foo::Subclass->meta()->simple2() returns expected value' ); +can_ok( Foo::Subclass->meta(), 'attr2' ); +is( Foo::Subclass->meta()->attr2(), 'something', + 'Foo::Subclass->meta()->attr2() returns expected value' ); +}