#!perl
+# UNIVERSAL methods should be wrappable
+
use strict;
use warnings;
+
+{
+ package FakeBar;
+ use Moose::Role;
-use Test::More;
+ around isa => sub {
+ my ($orig, $self, $v) = @_;
+ return 1 if $v eq 'Bar';
+ return $orig->($self, $v);
+ };
-{
package Foo;
use Moose;
-}
+
+ use Test::Exception;
+ use Test::More tests => 2;
+ TODO: {
+ local $TODO = 'UNIVERSAL methods should be wrappable';
-plan tests => scalar ( my @universal_methods = qw/isa can VERSION/ );
+ lives_ok { with 'FakeBar' } 'applied role';
-my $foo = Foo->new;
-
-TODO: {
- local $TODO = 'UNIVERSAL methods should be available';
-
- for my $method ( @universal_methods ) {
- ok $foo->meta->find_method_by_name($method), "has UNIVERSAL method $method";
- }
-};
+ my $foo = Foo->new;
+ isa_ok $foo, 'Bar';
+ };
+}