Mouse::Util::does_role() respects $thing->does() method
[gitmo/Mouse.git] / t / 100_bugs / 025_universal_methods_wrappable.t
1 use strict;
2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
5 use warnings;
6
7 use Test::Exception;
8 use Test::More;
9
10 {
11
12     package FakeBar;
13     use Mouse::Role;
14
15     around isa => sub {
16         my ( $orig, $self, $v ) = @_;
17         return 1 if $v eq 'Bar';
18         return $orig->( $self, $v );
19     };
20
21     package Foo;
22     use Mouse;
23
24     use Test::More; # for $TODO
25
26     ::lives_ok { with 'FakeBar' } 'applied role';
27
28     my $foo = Foo->new;
29     ::isa_ok $foo, 'Bar';
30 }
31
32 done_testing;