summaryrefslogtreecommitdiffstats
path: root/t/33-constructor-name.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-02-21 01:34:02 -0600
committerJesse Luehrs <doy@tozt.net>2011-02-21 01:34:02 -0600
commitd1149a69c6121025816d388fadc3861e7407c594 (patch)
tree4d46c95789b8abac0b6184427158abe59d4c475d /t/33-constructor-name.t
parent209100060d31fc0ac64676dea89adb6b8b0c1fb5 (diff)
downloadbread-board-declare-d1149a69c6121025816d388fadc3861e7407c594.tar.gz
bread-board-declare-d1149a69c6121025816d388fadc3861e7407c594.zip
support the constructor_name option
Diffstat (limited to 't/33-constructor-name.t')
-rw-r--r--t/33-constructor-name.t30
1 files changed, 30 insertions, 0 deletions
diff --git a/t/33-constructor-name.t b/t/33-constructor-name.t
new file mode 100644
index 0000000..28647ee
--- /dev/null
+++ b/t/33-constructor-name.t
@@ -0,0 +1,30 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+{
+ package Bar;
+
+ sub create { bless {}, shift }
+}
+
+{
+ package Foo;
+ use Moose;
+ use MooseX::Bread::Board;
+
+ has bar => (
+ is => 'ro',
+ isa => 'Bar',
+ class => 'Bar',
+ constructor_name => 'create',
+ );
+}
+
+{
+ my $foo = Foo->new;
+ isa_ok($foo->bar, 'Bar');
+}
+
+done_testing;