Ensure that we're not blowing away an inherited constructor
[gitmo/Mouse.git] / t / 401-meta-role.t
CommitLineData
9ffa533a 1#!/usr/bin/env perl
2use strict;
3use warnings;
83d0a1f4 4use Test::More tests => 5;
9ffa533a 5
6do {
7 package Role;
8 use Mouse::Role;
9
10 no Mouse::Role;
11};
12
13ok(Role->meta, "Role has a meta");
14isa_ok(Role->meta, "Mouse::Meta::Role");
15
513854c7 16is(Role->meta->name, "Role");
17
05c74c22 18ok(!Role->meta->has_attribute('attr'), "Role doesn't have attr attribute yet");
19
20do {
21 package Role;
22 use Mouse::Role;
23
24 has 'attr';
25
26 no Mouse::Role;
27};
28
29ok(Role->meta->has_attribute('attr'), "Role has an attr now");