added failing test for role composition
Robert Buels [Mon, 9 Aug 2010 16:59:46 +0000 (09:59 -0700)]
t/08-role-composition.t [new file with mode: 0644]

diff --git a/t/08-role-composition.t b/t/08-role-composition.t
new file mode 100644 (file)
index 0000000..08a3356
--- /dev/null
@@ -0,0 +1,31 @@
+use strict;
+use warnings;
+use Test::More;
+
+lives_ok {
+    Bar->new->_connections;
+} 'finds a class attribute under role composition';
+
+done_testing;
+
+BEGIN {
+
+package Role;
+use Moose::Role;
+use MooseX::ClassAttribute;
+
+class_has '_connections' => (
+    is => 'ro',
+    isa => 'HashRef',
+    default => sub { {} },
+   );
+
+package Role2;
+use Moose::Role;
+
+package Bar;
+use Moose;
+
+with ('Role2','Role');
+
+}