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