70a89ebfb62604969ed135807d39c5d68dac104e
[gitmo/Moose.git] / t / 100_bugs / 025_universal_methods_wrappable.t
1 #!perl
2
3 # UNIVERSAL methods should be wrappable
4
5 use strict;
6 use warnings;
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::Exception;
22     use Test::More tests => 2;
23
24     TODO: {
25         local $TODO = 'UNIVERSAL methods should be wrappable';
26
27         lives_ok { with 'FakeBar' } 'applied role';
28
29         my $foo = Foo->new;
30         isa_ok $foo, 'Bar';
31     };
32 }