Mouse::Util::does_role() respects $thing->does() method
[gitmo/Mouse.git] / t / 100_bugs / 025_universal_methods_wrappable.t
CommitLineData
4c98ebb0 1use strict;
ee5e6a03 2# This is automatically generated by author/import-moose-test.pl.
3# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4use t::lib::MooseCompat;
4c98ebb0 5use warnings;
6
7use Test::Exception;
ee5e6a03 8use Test::More;
4c98ebb0 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
4c98ebb0 26 ::lives_ok { with 'FakeBar' } 'applied role';
27
28 my $foo = Foo->new;
29 ::isa_ok $foo, 'Bar';
30}
ee5e6a03 31
32done_testing;