8 use Moose::Util qw(with_traits);
26 my $traited_class = with_traits('Foo', 'Foo::Role');
27 ok($traited_class->meta->is_anon_class, "we get an anon class");
28 isa_ok($traited_class, 'Foo');
29 does_ok($traited_class, 'Foo::Role');
33 my $traited_class = with_traits('Foo', 'Foo::Role', 'Foo::Role2');
34 ok($traited_class->meta->is_anon_class, "we get an anon class");
35 isa_ok($traited_class, 'Foo');
36 does_ok($traited_class, 'Foo::Role');
37 does_ok($traited_class, 'Foo::Role2');
41 my $traited_class = with_traits('Foo');
42 is($traited_class, 'Foo', "don't apply anything if we don't get any traits");
46 my $traited_class = with_traits('Foo', 'Foo::Role');
47 my $traited_class2 = with_traits('Foo', 'Foo::Role');
48 is($traited_class, $traited_class2, "get the same class back when passing the same roles");