Redid conversion to Test::Fatal
[gitmo/Moose.git] / t / 010_basics / 016_load_into_main.t
index ad598cf..5ed7754 100644 (file)
@@ -4,16 +4,15 @@ 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 => 2;
-}
+use Test::Fatal;
 
-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' );
+is( exception {
+    eval 'use Moose';
+}, undef, "export to main" );
 
-stderr_is( sub { package main; eval 'use Moose::Role' },
-           "Moose::Role does not export its sugar to the 'main' package.\n",
-           'Moose::Role warns when loaded from the main package' );
+isa_ok( main->meta, "Moose::Meta::Class" );
+
+isa_ok( main->new, "main");
+isa_ok( main->new, "Moose::Object" );
+
+done_testing;