Fix a typo
[gitmo/Mouse.git] / t / 001_mouse / 002-warnings.t
1 #!/usr/bin/env perl
2 use Test::More tests => 1;
3
4 # we used to use Test::Warn here but there's no point in adding three deps total
5 # for this one easy test
6
7 my @warnings;
8 local $SIG{__WARN__} = sub {
9     push @warnings, "@_";
10 };
11
12 do {
13     package Class;
14     use Mouse;
15
16     my $one = 1 + undef;
17 };
18
19 like("@warnings", qr/^Use of uninitialized value/, 'using Mouse turns on warnings');
20