ce212e7ae134a85ee7d196ac13c513af0a3c13b8
[gitmo/Mouse.git] / t / 030_roles / 037_create_role_subclass.t
1 #!/usr/bin/env perl
2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
5 use strict;
6 use warnings;
7 use Test::More;
8 use Mouse ();
9
10 do {
11     package My::Meta::Role;
12     use Mouse;
13     extends 'Mouse::Meta::Role';
14
15     has test_serial => (
16         is      => 'ro',
17         isa     => 'Int',
18         default => 1,
19     );
20
21     no Mouse;
22 };
23
24 my $role = My::Meta::Role->create_anon_role;
25 is($role->test_serial, 1, "default value for the serial attribute");
26
27 my $nine_role = My::Meta::Role->create_anon_role(test_serial => 9);
28 is($nine_role->test_serial, 9, "parameter value for the serial attribute");
29
30 done_testing;