Make sure -metaclass works for Moose too
Shawn M Moore [Wed, 15 Apr 2009 21:01:28 +0000 (17:01 -0400)]
t/050_metaclasses/022_new_metaclass.t [new file with mode: 0644]

diff --git a/t/050_metaclasses/022_new_metaclass.t b/t/050_metaclasses/022_new_metaclass.t
new file mode 100644 (file)
index 0000000..1eca249
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+do {
+    package My::Meta::Class;
+    use Moose;
+    BEGIN { extends 'Moose::Meta::Class' };
+};
+
+do {
+    package My::Class;
+    use Moose -metaclass => 'My::Meta::Class';
+};
+
+is(My::Class->meta->meta->name, 'My::Meta::Class');
+