6 use Test::More tests => 7;
15 sub foo_role_applied { 1 }
17 package Conflicts::With::Foo;
19 sub foo_role_applied { 0 }
28 $new_class = Mouse::Meta::Class->create(
30 superclasses => ['Class'],
36 my $with_foo = Class::WithFoo->new;
38 ok $with_foo->foo_role_applied;
39 isa_ok $with_foo, 'Class', '$with_foo';
42 Mouse::Meta::Class->create(
44 superclasses => ['Class'],
45 roles => 'Foo', # "oops"
47 } qr/You must pass an ARRAY ref of roles/;
49 ok !Mouse::Util::is_class_loaded('Made::Of::Fail'), "did not create Made::Of::Fail";
52 Mouse::Meta::Class->create(
53 'Continuing::To::Fail',
54 superclasses => ['Class'],
55 roles => ['Foo', 'Conflicts::With::Foo'],
57 } 'conflicting roles == death';
59 # XXX: Continuing::To::Fail gets created anyway