update repo to point to github
[gitmo/Moo.git] / t / extend-constructor.t
1 use strictures 1;
2 use Test::More;
3 use Test::Fatal;
4
5 BEGIN {
6   package Role::For::Constructor;
7   use Moo::Role;
8   has extra_param => (is => 'ro');
9 }
10 BEGIN {
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
29 done_testing;