show the first line here when testing with a harness
[gitmo/Moose.git] / t / todo_tests / required_role_accessors.t
1 #!/usr/bin/env perl
2 use strict;
3 use warnings;
4 use Test::More;
5 use Test::Fatal;
6
7 {
8     package Foo::API;
9     use Moose::Role;
10
11     requires 'foo';
12 }
13
14 {
15     package Foo;
16     use Moose::Role;
17
18     has foo => (is => 'ro');
19
20     with 'Foo::API';
21 }
22
23 {
24     package Foo::Class;
25     use Moose;
26     { our $TODO; local $TODO = "role accessors don't satisfy other role requires";
27     ::is( ::exception { with 'Foo' }, undef, 'requirements are satisfied properly' );
28     }
29 }
30
31 {
32     package Bar;
33     use Moose::Role;
34
35     requires 'baz';
36
37     has bar => (is => 'ro');
38 }
39
40 {
41     package Baz;
42     use Moose::Role;
43
44     requires 'bar';
45
46     has baz => (is => 'ro');
47 }
48
49 {
50     package BarBaz;
51     use Moose;
52
53     { our $TODO; local $TODO = "role accessors don't satisfy other role requires";
54     ::is( ::exception { with qw(Bar Baz) }, undef, 'requirements are satisfied properly' );
55     }
56 }
57
58 done_testing;