summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-05-07 23:47:49 -0500
committerJesse Luehrs <doy@tozt.net>2009-05-07 23:47:49 -0500
commitcd6b831bc983387f5b7fadd4684db16dfaf10394 (patch)
tree0a80671885cac6fcd347a4dc25b8bb7a2dc57551 /t
parent02de7898f135026608eb566fb0114cb6bbf76803 (diff)
parent9a1a527fb3f1291e2187d38d77784844a2e27ee2 (diff)
downloadmoosex-nonmoose-cd6b831bc983387f5b7fadd4684db16dfaf10394.tar.gz
moosex-nonmoose-cd6b831bc983387f5b7fadd4684db16dfaf10394.zip
Merge branch 'master' of git://github.com/jasonmay/moosex-nonmoose
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');
+}