X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F010_basics%2F016_load_into_main.t;h=5ed7754a53872c87116a732ca045f199861b2ca9;hb=61697425b329bc667185bb5b2f4be223f2be62c0;hp=ad598cf6618f7f4b8b7d1d4da6251c4128b4c221;hpb=3d659f7f6bcd27e8cf7958233972e45028e0de50;p=gitmo%2FMoose.git diff --git a/t/010_basics/016_load_into_main.t b/t/010_basics/016_load_into_main.t index ad598cf..5ed7754 100644 --- a/t/010_basics/016_load_into_main.t +++ b/t/010_basics/016_load_into_main.t @@ -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;