TODO test for how I expected ->does to work
Todd Hepler [Fri, 5 Dec 2008 21:25:38 +0000 (21:25 +0000)]
t/013-does.t [new file with mode: 0644]

diff --git a/t/013-does.t b/t/013-does.t
new file mode 100644 (file)
index 0000000..c7132c5
--- /dev/null
@@ -0,0 +1,30 @@
+
+use strict;
+use warnings;
+
+#use Test::More tests => 3;
+use Test::More skip_all => 'TODO';
+use Test::Moose;
+
+{
+    package MyPRole;
+    use MooseX::Role::Parameterized;
+    role {};
+}
+
+{
+    package MyClass;
+    use Moose;
+    with 'MyPRole',
+}
+
+my $generated_role = MyClass->meta->roles->[0]->name;
+does_ok( 'MyClass', $generated_role, 'class does the generate role' );
+does_ok( 'MyClass', 'MyPRole', 'class does the parameterized role' );
+cmp_ok(
+    $generated_role->meta->get_roles->[0]->name,
+    'eq',
+    'MyProle',
+    'generated role does the parameterized role'
+);
+