Add a comment
[gitmo/Mouse.git] / t / 033-requires.t
CommitLineData
59089ec3 1#!perl
2use strict;
3use warnings;
4use Test::More tests => 1;
eab81545 5use Test::Exception;
59089ec3 6
7{
8 package Foo;
9 use Mouse::Role;
10 requires 'foo';
11}
12
13throws_ok {
14 package Bar;
15 use Mouse;
16 with 'Foo';
17} qr/'Foo' requires the method 'foo' to be implemented by 'Bar'/;
18
19{
20 package Baz;
21 use Mouse;
22 with 'Foo';
23 sub foo { }
24}
25