use strict;
use warnings;
-use Test::More tests => 17;
+use Test::More;
BEGIN {
package MooseX::Singleton::Test;
MooseX::Singleton::Test->_clear_instance;
$mst = $mst2 = undef;
is( MooseX::Singleton::Test->instance->distinct_keys, 1, "back to the default" );
+
+done_testing;
use strict;
use warnings;
-use Test::More tests => 11;
+use Test::More;
use Test::Exception;
my $i = 0;
ok( Single->new, 'can call ->new without any args' );
ok( Single->instance, 'can call ->instance without any args' );
}
+
+done_testing;
use Test::More;
BEGIN {
- unless ( eval 'use Test::Warn; 1' ) {
- plan skip_all => 'These tests require Test::Warn';
- }
- else {
- plan tests => 18;
- }
+ eval 'use Test::Warn';
+ plan skip_all => 'These tests require Test::Warn' if $@;
}
{
'singleton is not randomly destroyed'
);
}
+
+done_testing;
use strict;
use warnings;
-use Test::More 'no_plan';
+use Test::More;
{
package MySingleton;
MySingleton->attrib, 'bar',
'BUILDARGS changed value of attrib when instance was explicitly instantiated'
);
+
+done_testing;
use strict;
use warnings;
-use Test::More 'no_plan';
+use Test::More;
{
package MySingleton;
MySingleton->attrib, 'bar',
'BUILDARGS changed value of attrib when instance was explicitly instantiated'
);
+
+done_testing;
use Test::More;
BEGIN {
- eval "require MooseX::StrictConstructor; use Test::Exception; 1;";
+ eval "require MooseX::StrictConstructor; use Test::Exception;";
plan skip_all =>
'This test requires MooseX::StrictConstructor and Test::Exception'
if $@;
}
-plan 'no_plan';
-
{
package MySingleton;
use Moose;
MySingleton->new( bad_name => 42 );
}
qr/Found unknown attribute/, 'singleton class also has a strict constructor';
+
+done_testing;