Add parens for isa_ok
[gitmo/Moose.git] / t / basics / universal_methods_wrappable.t
CommitLineData
6c13ef0d 1use strict;
2use warnings;
5bf26510 3
b10dde3a 4use Test::Fatal;
a28e50e4 5use Test::More;
5bf26510 6
6dabb7f5 7{
5bf26510 8
6dabb7f5 9 package FakeBar;
10 use Moose::Role;
6c13ef0d 11
6dabb7f5 12 around isa => sub {
5bf26510 13 my ( $orig, $self, $v ) = @_;
6dabb7f5 14 return 1 if $v eq 'Bar';
5bf26510 15 return $orig->( $self, $v );
6dabb7f5 16 };
6c13ef0d 17
6c13ef0d 18 package Foo;
19 use Moose;
6c13ef0d 20
a28643a3 21 use Test::More; # for $TODO
6c13ef0d 22
b10dde3a 23 ::is( ::exception { with 'FakeBar' }, undef, 'applied role' );
a28643a3 24
25 my $foo = Foo->new;
8596646e 26 ::isa_ok( $foo, 'Bar' );
6dabb7f5 27}
a28e50e4 28
29done_testing;