Test::Output IS optional
[gitmo/Moose.git] / t / 010_basics / 016_load_into_main.t
CommitLineData
7ff56534 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
3d659f7f 6use Test::More;
7BEGIN {
8 eval "use Test::Output;";
9 plan skip_all => "Test::Output is required for this test" if $@;
10 plan tests => 2;
11}
7ff56534 12
13stderr_is( sub { package main; eval 'use Moose' },
14 "Moose does not export its sugar to the 'main' package.\n",
15 'Moose warns when loaded from the main package' );
f967bf02 16
17stderr_is( sub { package main; eval 'use Moose::Role' },
18 "Moose::Role does not export its sugar to the 'main' package.\n",
19 'Moose::Role warns when loaded from the main package' );