Convert all tests to done_testing.
[gitmo/Moose.git] / t / 050_metaclasses / 017_use_base_of_moose.t
CommitLineData
2b72f3b4 1#!/usr/bin/env perl
2
3use strict;
4use warnings;
5
a28e50e4 6use Test::More;
2b72f3b4 7use Test::Exception;
8
9{
10 package NoOpTrait;
11 use Moose::Role;
12}
13
14{
15 package Parent;
16 use Moose -traits => 'NoOpTrait';
17
18 has attr => (
19 is => 'rw',
20 isa => 'Str',
21 );
22}
23
24{
25 package Child;
26 use base 'Parent';
27}
28
29is(Child->meta->name, 'Child', "correct metaclass name");
30
31my $child = Child->new(attr => "ibute");
32ok($child, "constructor works");
33
34is($child->attr, "ibute", "getter inherited properly");
35
36$child->attr("ition");
37is($child->attr, "ition", "setter inherited properly");
a28e50e4 38
39done_testing;