Changes for next version
[gitmo/MooseX-Singleton.git] / t / 006-cooperative.t
1 use strict;
2 use warnings;
3
4 use Test::More;
5
6 use Test::Requires {
7     'MooseX::StrictConstructor' => 0.16,
8     'Test::Fatal' => 0.001,
9 };
10
11 {
12     package MySingleton;
13     use Moose;
14     use MooseX::Singleton;
15     use MooseX::StrictConstructor;
16
17     has 'attrib' => ( is => 'rw' );
18 }
19
20 like( exception {
21     MySingleton->new( bad_name => 42 );
22 },
23 qr/Found unknown attribute/, 'singleton class also has a strict constructor');
24
25 done_testing;