Need MX::SC 0.16 for this test to work
[gitmo/MooseX-Singleton.git] / t / 006-cooperative.t
CommitLineData
8eec3c69 1use strict;
2use warnings;
3
4use Test::More;
5
abf9a01f 6use Test::Requires {
bd2e7320 7 'MooseX::StrictConstructor' => 0.16,
181569bb 8 'Test::Fatal' => 0.001,
abf9a01f 9};
8eec3c69 10
8eec3c69 11{
12 package MySingleton;
13 use Moose;
14 use MooseX::Singleton;
15 use MooseX::StrictConstructor;
16
089ff853 17 has 'attrib' => ( is => 'rw' );
8eec3c69 18}
19
c1068a21 20like( exception {
4c256923 21 MySingleton->new( bad_name => 42 );
c1068a21 22},
23qr/Found unknown attribute/, 'singleton class also has a strict constructor');
e01c7277 24
25done_testing;