add a warning for immutablizing a class with mutable ancestors
[gitmo/Moose.git] / t / 010_basics / 016_load_into_main.t
index c8cc9fd..fde43f0 100644 (file)
@@ -4,13 +4,16 @@ use strict;
 use warnings;
 
 use Test::More;
-
 BEGIN {
     eval "use Test::Output;";
     plan skip_all => "Test::Output is required for this test" if $@;
-    plan tests => 1;
+    plan tests => 2;
 }
 
-stderr_is( sub { package main; eval 'use Moose' },
-           "Moose does not export its sugar to the 'main' package.\n",
-           'Moose warns when loaded from the main package' );
+stderr_like( sub { package main; eval 'use Moose' },
+             qr/\QMoose does not export its sugar to the 'main' package/,
+             'Moose warns when loaded from the main package' );
+
+stderr_like( sub { package main; eval 'use Moose::Role' },
+             qr/\QMoose::Role does not export its sugar to the 'main' package/,
+             'Moose::Role warns when loaded from the main package' );