bump version to 0.18
[gitmo/MooseX-Singleton.git] / t / 003-immutable.t
index 9cc74ec..e5a4047 100644 (file)
@@ -12,7 +12,7 @@ BEGIN {
     }
 }
 
-BEGIN {
+{
     package MooseX::Singleton::Test;
     use MooseX::Singleton;
 
@@ -39,8 +39,8 @@ BEGIN {
 
         $self->bag->{$key} += $value;
     }
-
-    ::warning_is sub { make_immutable }, '',
+__PACKAGE__->meta->make_immutable;
+    ::warning_is sub { __PACKAGE__->meta->make_immutable }, '',
         'no warnings when calling make_immutable';
 }