Make sure renaming the role block export works
Shawn M Moore [Tue, 2 Dec 2008 08:56:33 +0000 (08:56 +0000)]
t/012-rename-role.t [new file with mode: 0644]

diff --git a/t/012-rename-role.t b/t/012-rename-role.t
new file mode 100644 (file)
index 0000000..a59f715
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+do {
+    package MyRole;
+    use MooseX::Role::Parameterized (
+        role => { -as => 'parameterized_role' },
+        'method',
+    );
+
+    parameterized_role {
+        method ok => sub {};
+    };
+};
+
+my $role = MyRole->meta->generate_role;
+ok($role->has_method('ok'), "renaming the role block export works");
+