From b2657b911ca65f9ea4e747855c0973b67f210562 Mon Sep 17 00:00:00 2001 From: doy Date: Sat, 11 Apr 2009 18:11:42 -0500 Subject: actually test the right thing in the tests for inheriting from moose - they fail now, like i thought they should have been --- t/005-moose.t | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 't') diff --git a/t/005-moose.t b/t/005-moose.t index c6c6ac8..64b3c8f 100644 --- a/t/005-moose.t +++ b/t/005-moose.t @@ -42,16 +42,14 @@ isa_ok $foo_othersub, 'Foo'; is $foo_othersub->foo, 'FOO', 'inheritance works (immutable when extending)'; ok(Foo::OtherSub->meta->has_method('new'), 'Foo::OtherSub has its own inlined constructor (immutable when extending)'); -ok(!(Foo::OtherSub->meta->get_method('new')->can('does_role') - && Foo::OtherSub->meta->get_method('new')->does_role('MooseX::NonMoose::Meta::Role::Constructor')), - 'Foo::OtherSub\'s inlined constructor is from Moose, not MooseX::NonMoose (immutable when extending)'); +ok(!Foo::OtherSub->meta->constructor_class->meta->isa('Moose::Meta::Class'), + 'Foo::OtherSub\'s constructor class hasn\'t had any roles applied to it (immutable when extending)'); Foo::OtherSub->meta->make_immutable; $foo_othersub = Foo::OtherSub->new; isa_ok $foo_othersub, 'Foo'; is $foo_othersub->foo, 'FOO', 'inheritance works (all immutable)'; ok(Foo::OtherSub->meta->has_method('new'), - 'Foo::OtherSub has its own inlined constructor (immutable when extending)'); -ok(!(Foo::OtherSub->meta->get_method('new')->can('does_role') - && Foo::OtherSub->meta->get_method('new')->does_role('MooseX::NonMoose::Meta::Role::Constructor')), - 'Foo::OtherSub\'s inlined constructor is from Moose, not MooseX::NonMoose (immutable when extending)'); + 'Foo::OtherSub has its own inlined constructor (all immutable)'); +ok(!Foo::OtherSub->meta->constructor_class->meta->isa('Moose::Meta::Class'), + 'Foo::OtherSub\'s constructor class hasn\'t had any roles applied to it (all immutable)'); -- cgit v1.2.3-54-g00ecf