diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-05-28 23:58:31 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-05-28 23:58:31 -0500 |
commit | b4043c557cfe277054e1077124d679aa24bda89c (patch) | |
tree | f1545ced6efc44301e08d700cf17424c9c441a24 | |
parent | 9a3bb554e8e0c4848212dce8a2cfdf324b2c2229 (diff) | |
download | moosex-abc-b4043c557cfe277054e1077124d679aa24bda89c.tar.gz moosex-abc-b4043c557cfe277054e1077124d679aa24bda89c.zip |
add failing test
-rw-r--r-- | t/003-custom-constructor.t | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/003-custom-constructor.t b/t/003-custom-constructor.t new file mode 100644 index 0000000..cb12835 --- /dev/null +++ b/t/003-custom-constructor.t @@ -0,0 +1,24 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::More tests => 1; + +our $custom_constructor_called = 0; + +package Foo; +use Moose; +use MooseX::ABC; + +requires 'bar', 'baz'; + +package Foo::Sub; +use Moose; +extends 'Foo'; + +sub bar { } +sub baz { } +sub new { $::custom_constructor_called++; shift->SUPER::new(@_) } + +package main; +my $foosub = Foo::Sub->new; +ok($custom_constructor_called, 'custom constructor was called'); |