2 use warnings FATAL => 'all';
5 use Test::Warnings ':no_end_test', ':all';
8 # Test for a warning when you make the stupid mistake I make all the time
9 # of saying use MooseX::Types::Common qw/NonEmptySimpleStr/;
11 require MooseX::Types::Common;
14 [ warnings { MooseX::Types::Common->import } ],
16 'No warning if nothing imported',
20 [ warnings { MooseX::Types::Common->import('NonEmptySimpleStr') } ],
21 [ re(qr/Did you mean.*NonEmptySimpleStr/s) ],
22 'Warning mentions bad type',
25 had_no_warnings if $ENV{AUTHOR_TESTING};