added new test: t/030_roles/032_roles_alias_methods.t
Tokuhiro Matsuno [Fri, 29 Aug 2008 03:16:00 +0000 (03:16 +0000)]
this test failes on only perl 5.10(maybe)

t/030_roles/032_roles_alias_methods.t [new file with mode: 0644]

diff --git a/t/030_roles/032_roles_alias_methods.t b/t/030_roles/032_roles_alias_methods.t
new file mode 100644 (file)
index 0000000..8e11e97
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 2;
+use Test::Exception;
+use Moose::Meta::Class;
+use Moose::Util;
+
+use lib 't/lib', 'lib';
+
+use Role::Child;
+
+_test('Role::Parent', 'meth1,meth2');
+_test('Role::Child', 'aliased_meth1,meth1,meth2');
+
+sub _test {
+    my ($role, $methods) = @_;
+    is join(',', sort $role->meta->get_method_list), $methods;
+}
+