Moved to t/100_bugs per stevan
[gitmo/Moose.git] / t / 100_bugs / 025_universal_methods_wrappable.t
CommitLineData
6c13ef0d 1#!perl
2
6dabb7f5 3# UNIVERSAL methods should be wrappable
4
6c13ef0d 5use strict;
6use warnings;
6dabb7f5 7
8{
9 package FakeBar;
10 use Moose::Role;
6c13ef0d 11
6dabb7f5 12 around isa => sub {
13 my ($orig, $self, $v) = @_;
14 return 1 if $v eq 'Bar';
15 return $orig->($self, $v);
16 };
6c13ef0d 17
6c13ef0d 18 package Foo;
19 use Moose;
6dabb7f5 20
21 use Test::Exception;
22 use Test::More tests => 2;
6c13ef0d 23
6dabb7f5 24 TODO: {
25 local $TODO = 'UNIVERSAL methods should be wrappable';
6c13ef0d 26
6dabb7f5 27 lives_ok { with 'FakeBar' } 'applied role';
6c13ef0d 28
6dabb7f5 29 my $foo = Foo->new;
30 isa_ok $foo, 'Bar';
31 };
32}