From: Tomas Doran (t0m Date: Wed, 1 Jul 2009 17:35:26 +0000 (+0100) Subject: Test as requested by autarch X-Git-Tag: 0.89~9^2~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a0e27d2e8f8336c08d8b70b4df690224e9b9b5c0;p=gitmo%2FClass-MOP.git Test as requested by autarch --- diff --git a/Changes b/Changes index ab8dca5..56892fa 100644 --- a/Changes +++ b/Changes @@ -82,6 +82,9 @@ Revision history for Perl extension Class-MOP. * Class::MOP::Package - Disable prototype mismatch warnings for add_package_symbol. (Florian Ragwitz) + * Tests + - Add test for finding methods from $meta->name->meta before immutable, + (t0m) 0.83 Mon, April 27, 2009 * Class::MOP::Class diff --git a/t/087_immutable_role_application_bug.t b/t/087_immutable_role_application_bug.t new file mode 100644 index 0000000..3e62e00 --- /dev/null +++ b/t/087_immutable_role_application_bug.t @@ -0,0 +1,29 @@ +use strict; +use warnings; +BEGIN { + package My::Meta::Trait; + use Moose::Role; + + our $FAILED = 0; + + before 'make_immutable' => sub { + my ($meta) = @_; + # $meta->name->meta should have the correct methods on it.. + $FAILED++ unless $meta->name->meta->get_method('some_method'); + }; +} +{ + package TestClass; + use Moose -traits => 'My::Meta::Trait'; + + sub some_method {} + + __PACKAGE__->meta->make_immutable; +} + +use Test::More tests => 1; +TODO: { + local $TODO = 'This broke as of 07302fb'; + is $My::Meta::Trait::FAILED, 0, 'Can find method'; +} +