Regenerate test files
[gitmo/Mouse.git] / t / 050_metaclasses / 001_custom_attr_meta_with_roles.t
CommitLineData
4060c871 1#!/usr/bin/perl
fde8e43f 2# This is automatically generated by author/import-moose-test.pl.
3# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4use t::lib::MooseCompat;
4060c871 5
6use strict;
7use warnings;
8
fde8e43f 9use Test::More;
4060c871 10use Test::Exception;
11
12
4060c871 13{
14 package My::Custom::Meta::Attr;
15 use Mouse;
16
17 extends 'Mouse::Meta::Attribute';
18}
19
20{
21 package My::Fancy::Role;
22 use Mouse::Role;
23
24 has 'bling_bling' => (
25 metaclass => 'My::Custom::Meta::Attr',
26 is => 'rw',
27 isa => 'Str',
28 );
29}
30
31{
32 package My::Class;
33 use Mouse;
34
35 with 'My::Fancy::Role';
36}
37
38my $c = My::Class->new;
39isa_ok($c, 'My::Class');
40
41ok($c->meta->has_attribute('bling_bling'), '... got the attribute');
42
43isa_ok($c->meta->get_attribute('bling_bling'), 'My::Custom::Meta::Attr');
44
fde8e43f 45done_testing;