Format Changes
[gitmo/Mouse.git] / t / 001_mouse / 033-requires.t
1 #!perl
2 use strict;
3 use warnings;
4 use Test::More tests => 1;
5 use Test::Exception;
6
7 {
8     package Foo;
9     use Mouse::Role;
10     requires 'foo';
11 }
12
13 throws_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