Remove our (now broken) dzil GatherDir subclass
[gitmo/Moose.git] / t / native_traits / array_from_role.t
CommitLineData
e3c07b19 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
a28e50e4 6use Test::More;
b10dde3a 7use Test::Fatal;
e3c07b19 8
e3c07b19 9{
10 package Foo;
11 use Moose;
12
d50fc84a 13 has 'bar' => ( is => 'rw' );
e3c07b19 14
15 package Stuffed::Role;
16 use Moose::Role;
17
18 has 'options' => (
a40b446a 19 traits => ['Array'],
d50fc84a 20 is => 'ro',
21 isa => 'ArrayRef[Foo]',
e3c07b19 22 );
23
24 package Bulkie::Role;
25 use Moose::Role;
26
27 has 'stuff' => (
a40b446a 28 traits => ['Array'],
d50fc84a 29 is => 'ro',
30 isa => 'ArrayRef',
31 handles => {
c13596ce 32 get_stuff => 'get',
e3c07b19 33 }
34 );
35
36 package Stuff;
37 use Moose;
38
b10dde3a 39 ::is( ::exception { with 'Stuffed::Role';
40 }, undef, '... this should work correctly' );
e3c07b19 41
b10dde3a 42 ::is( ::exception { with 'Bulkie::Role';
43 }, undef, '... this should work correctly' );
e3c07b19 44}
a28e50e4 45
46done_testing;