summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJason May <jason.a.may@gmail.com>2009-05-07 21:59:14 -0400
committerJason May <jason.a.may@gmail.com>2009-05-07 21:59:14 -0400
commit9a1a527fb3f1291e2187d38d77784844a2e27ee2 (patch)
tree54d0d18cfa6b007e962a46f30456ac95c1cfff35 /t
parentedc18fe906a431aac74a4b33902e99faa3c6b7f8 (diff)
downloadmoosex-nonmoose-9a1a527fb3f1291e2187d38d77784844a2e27ee2.tar.gz
moosex-nonmoose-9a1a527fb3f1291e2187d38d77784844a2e27ee2.zip
failing test for subclassing a mx-nonmoose-using module
Diffstat (limited to 't')
-rw-r--r--t/023-FOREIGNBUILDARGS.t17
1 files changed, 16 insertions, 1 deletions
diff --git a/t/023-FOREIGNBUILDARGS.t b/t/023-FOREIGNBUILDARGS.t
index 1434c76..7967fdb 100644
--- a/t/023-FOREIGNBUILDARGS.t
+++ b/t/023-FOREIGNBUILDARGS.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 8;
+use Test::More tests => 9;
package Foo;
@@ -46,6 +46,15 @@ sub BUILDARGS {
return { bar => shift };
}
+# XXX XXX XXX
+package Baz::Moose;
+use Moose;
+extends 'Bar::Moose';
+
+has baz => (
+ is => 'rw',
+);
+
package main;
my $foo = Foo::Moose->new(foo => 'bar');
@@ -62,3 +71,9 @@ is($foo->foo, 'bar', 'subclass constructor gets the right args (immutable)');
is($foo->foo_base, 'bar_base', 'subclass constructor gets the right args (immutable)');
is($bar->bar, 'baz', 'subclass constructor gets the right args (immutable)');
is($bar->foo_base, 'baz_base', 'subclass constructor gets the right args (immutable)');
+
+TODO: {
+ todo_skip "can't extend classes that use FOREIGNBUILDARGS yet", 1;
+ my $baz = Baz::Moose->new('bazbaz');
+ is($baz->bar, 'bazbaz_base', 'extensions of extensions of the nonmoose class respect FOREIGNBUILDARGS');
+}