388b28c3c47ba9e8f10141a4ff632438aed9fd92
[gitmo/Moose.git] / t / basics / universal_methods_wrappable.t
1 use strict;
2 use warnings;
3
4 use Test::Fatal;
5 use Test::More;
6
7 {
8
9     package FakeBar;
10     use Moose::Role;
11
12     around isa => sub {
13         my ( $orig, $self, $v ) = @_;
14         return 1 if $v eq 'Bar';
15         return $orig->( $self, $v );
16     };
17
18     package Foo;
19     use Moose;
20
21     use Test::More; # for $TODO
22
23     ::is( ::exception { with 'FakeBar' }, undef, 'applied role' );
24
25     my $foo = Foo->new;
26     ::isa_ok( $foo, 'Bar' );
27 }
28
29 done_testing;