diff options
author | doy <doy@tozt.net> | 2009-04-11 18:11:42 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-04-11 18:11:42 -0500 |
commit | b2657b911ca65f9ea4e747855c0973b67f210562 (patch) | |
tree | f20bb404a35b4e4b26d9cc56ce301cffe3d84358 /t | |
parent | 83f7cd2cfadeffe711a275472975bbe247bea8af (diff) | |
download | moosex-nonmoose-b2657b911ca65f9ea4e747855c0973b67f210562.tar.gz moosex-nonmoose-b2657b911ca65f9ea4e747855c0973b67f210562.zip |
actually test the right thing in the tests for inheriting from moose - they fail now, like i thought they should have been
Diffstat (limited to 't')
-rw-r--r-- | t/005-moose.t | 12 |
1 files changed, 5 insertions, 7 deletions
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)'); |