X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Singleton.git;a=blobdiff_plain;f=t%2F002-init.t;h=bb1a5481542393761899972224692c0041d104ad;hp=040547db6cf40ea544aba1f8c0545e8a3dae2f57;hb=e6fd0d07a3e79832893c8095ec634f9481c6aff9;hpb=a5507842e4d12755960898353407de7b0b6fd098 diff --git a/t/002-init.t b/t/002-init.t index 040547d..bb1a548 100644 --- a/t/002-init.t +++ b/t/002-init.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More; use Test::Exception; my $i = 0; @@ -51,3 +51,18 @@ for my $pkg (new_singleton_pkg) { "...but ->initialize() is still an error"; } +{ + package Single; + + use MooseX::Singleton; + + has foo => ( is => 'ro' ); +} + +{ + Single->initialize( foo => 2 ); + ok( Single->new, 'can call ->new without any args' ); + ok( Single->instance, 'can call ->instance without any args' ); +} + +done_testing;