From ab1a628d7a486f68cc63c42077213756962d4744 Mon Sep 17 00:00:00 2001 From: doy Date: Sat, 11 Apr 2009 17:57:47 -0500 Subject: add tests for adding the constructor properly when inheriting from non-moose classes --- t/001-basic.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 't/001-basic.t') diff --git a/t/001-basic.t b/t/001-basic.t index 13d2a6b..1cd45e3 100644 --- a/t/001-basic.t +++ b/t/001-basic.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 7; package Foo; @@ -22,3 +22,8 @@ isa_ok $foo, 'Foo'; is $foo->{_class}, 'Foo', 'Foo gets the correct class'; isa_ok $foo_moose, 'Foo::Moose'; is $foo_moose->{_class}, 'Foo::Moose', 'Foo::Moose gets the correct class'; +my $meta = Foo::Moose->meta; +ok $meta->has_method('new'), 'Foo::Moose has its own constructor'; +isa_ok $meta->constructor_class->meta, 'Moose::Meta::Class'; +ok $meta->constructor_class->meta->does_role('MooseX::NonMoose::Meta::Role::Constructor'), + 'Foo::Moose gets its constructor from MooseX::NonMoose'; -- cgit v1.2.3-54-g00ecf