Remove useless whitespace
[gitmo/MooseX-Singleton.git] / t / 006-cooperative.t
CommitLineData
8eec3c69 1use strict;
2use warnings;
3
4use Test::More;
5
6BEGIN {
e01c7277 7 eval "require MooseX::StrictConstructor; use Test::Exception;";
4c256923 8 plan skip_all =>
9 'This test requires MooseX::StrictConstructor and Test::Exception'
8eec3c69 10 if $@;
11}
12
8eec3c69 13{
14 package MySingleton;
15 use Moose;
16 use MooseX::Singleton;
17 use MooseX::StrictConstructor;
18
089ff853 19 has 'attrib' => ( is => 'rw' );
8eec3c69 20}
21
22throws_ok {
4c256923 23 MySingleton->new( bad_name => 42 );
8eec3c69 24}
4c256923 25qr/Found unknown attribute/, 'singleton class also has a strict constructor';
e01c7277 26
27done_testing;