Implement strict constructors, which will warn unkown constructor arguments
[gitmo/Mouse.git] / t / 100_bugs / 025_universal_methods_wrappable.t
CommitLineData
4c98ebb0 1use strict;
2use warnings;
3
4use Test::Exception;
5use Test::More tests => 2;
6
7{
8
9 package FakeBar;
10 use Mouse::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 Mouse;
20
21 use Test::More; # for $TODO
22
23 local $TODO = 'UNIVERSAL methods should be wrappable';
24
25 ::lives_ok { with 'FakeBar' } 'applied role';
26
27 my $foo = Foo->new;
28 ::isa_ok $foo, 'Bar';
29}