convert to using Test::Requires, and add explicit test counts
[gitmo/MooseX-ClassAttribute.git] / t / 08-role-composition.t
1 use strict;
2 use warnings;
3
4 use Test::More tests => 1;
5 use Test::Exception;
6
7 lives_ok {
8     Bar->new->_connections;
9 } 'finds a class attribute under role composition';
10
11
12 BEGIN {
13
14 package Role;
15 use Moose::Role;
16 use MooseX::ClassAttribute;
17
18 class_has '_connections' => (
19     is => 'ro',
20     isa => 'HashRef',
21     default => sub { {} },
22    );
23
24 package Role2;
25 use Moose::Role;
26
27 package Bar;
28 use Moose;
29
30 with ('Role2','Role');
31
32 }