From b4043c557cfe277054e1077124d679aa24bda89c Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 28 May 2009 23:58:31 -0500 Subject: add failing test --- t/003-custom-constructor.t | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 t/003-custom-constructor.t 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'); -- cgit v1.2.3