remove needless use of Capture::Tiny
[gitmo/MooseX-Types-Common.git] / t / 03-idiot.t
CommitLineData
acf4d245 1use strict;
eae6c2c4 2use warnings FATAL => 'all';
acf4d245 3
c44948b6 4use Test::More tests => 2;
5use Test::Warnings ':no_end_test', ':all';
6use Test::Deep;
acf4d245 7
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/;
10
c44948b6 11require MooseX::Types::Common;
acf4d245 12
c44948b6 13cmp_deeply(
14 [ warnings { MooseX::Types::Common->import } ],
15 [],
16 'No warning if nothing imported',
17);
acf4d245 18
c44948b6 19cmp_deeply(
20 [ warnings { MooseX::Types::Common->import('NonEmptySimpleStr') } ],
21 [ re(qr/Did you mean.*NonEmptySimpleStr/s) ],
22 'Warning mentions bad type',
23);
acf4d245 24