From: Yuval Kogman Date: Mon, 16 Jun 2008 22:13:59 +0000 (+0000) Subject: failing test for inheriting from non Mouse class X-Git-Tag: 0.04~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9b2c1c4edf716f870c325a2cf01aa05a17ef02d6;p=gitmo%2FMouse.git failing test for inheriting from non Mouse class --- diff --git a/t/301-bugs-non-mouse.t b/t/301-bugs-non-mouse.t new file mode 100644 index 0000000..bfa53a4 --- /dev/null +++ b/t/301-bugs-non-mouse.t @@ -0,0 +1,34 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Test::More 'no_plan'; +use Test::Exception; + +{ + package Foo; + use Mouse; + + has foo => ( is => "rw" ); + + package Bar; + sub oink { "oink" } + + package Gorch; + use Mouse; + + extends qw(Bar Foo); + + ::lives_ok{ + has '+foo' => ( default => "the default" ); + } 'inherit attr when @ISA contains a non Mouse class before a Mouse class with the base attr'; +} + +{ + my $g = Gorch->new; + + is( $g->foo, "the default", "inherited attribute" ); +} + +