Import Moose/t/100_bugs
[gitmo/Mouse.git] / t / 100_bugs / 025_universal_methods_wrappable.t
diff --git a/t/100_bugs/025_universal_methods_wrappable.t b/t/100_bugs/025_universal_methods_wrappable.t
new file mode 100644 (file)
index 0000000..c995172
--- /dev/null
@@ -0,0 +1,29 @@
+use strict;
+use warnings;
+
+use Test::Exception;
+use Test::More tests => 2;
+
+{
+
+    package FakeBar;
+    use Mouse::Role;
+
+    around isa => sub {
+        my ( $orig, $self, $v ) = @_;
+        return 1 if $v eq 'Bar';
+        return $orig->( $self, $v );
+    };
+
+    package Foo;
+    use Mouse;
+
+    use Test::More; # for $TODO
+
+    local $TODO = 'UNIVERSAL methods should be wrappable';
+
+    ::lives_ok { with 'FakeBar' } 'applied role';
+
+    my $foo = Foo->new;
+    ::isa_ok $foo, 'Bar';
+}