From: Jesse Luehrs Date: Tue, 23 Jun 2009 05:25:34 +0000 (-0500) Subject: test that the trait is still applied X-Git-Tag: 0.83~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=28469dc6ef08ddd6bd8d02f1787a0469a34a85f4;p=gitmo%2FMoose.git test that the trait is still applied --- diff --git a/t/300_immutable/014_immutable_metaclass_with_traits.t b/t/300_immutable/014_immutable_metaclass_with_traits.t index 30d74e5..0a76d41 100644 --- a/t/300_immutable/014_immutable_metaclass_with_traits.t +++ b/t/300_immutable/014_immutable_metaclass_with_traits.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 12; +use Test::More tests => 14; { package FooTrait; @@ -21,6 +21,7 @@ isa_ok(Class::MOP::class_of($meta), 'Moose::Meta::Class'); isa_ok($meta->meta, 'Moose::Meta::Class'); ok($meta->is_mutable, "class is mutable"); ok(Class::MOP::class_of($meta)->is_mutable, "metaclass is mutable"); +ok($meta->meta->does_role('FooTrait'), "does the trait"); Foo->meta->make_immutable; is(Class::MOP::class_of('Foo'), Foo->meta, "class_of and ->meta are the same on Foo (immutable)"); @@ -34,3 +35,4 @@ TODO: { "class_of and ->meta are the same on Foo's metaclass (immutable)"); isa_ok(Class::MOP::class_of($meta), 'Moose::Meta::Class'); } +ok($meta->meta->does_role('FooTrait'), "still does the trait after immutable");