no automatic travis testing for wip/blocked branches
[gitmo/Moo.git] / t / extend-constructor.t
CommitLineData
6b3fe092 1use strictures 1;
2use Test::More;
3use Test::Fatal;
4
5BEGIN {
6 package Role::For::Constructor;
7 use Moo::Role;
8 has extra_param => (is => 'ro');
9}
10BEGIN {
11 package Some::Class;
12 use Moo;
13 BEGIN {
14 my $con = Moo->_constructor_maker_for(__PACKAGE__);
15 Moo::Role->apply_roles_to_object($con, 'Role::For::Constructor');
16 }
17}
18
19{
20 package Some::SubClass;
21 use Moo;
22 extends 'Some::Class';
23
24 ::is(::exception {
25 has bar => (is => 'ro');
26 }, undef, 'extending constructor generator works');
27}
28
29done_testing;