TODOify rbuels's failing test, see [rt.cpan.org #47350]
[gitmo/Moose.git] / t / 010_basics / 021_attr_override_method_warning.t
CommitLineData
d111406d 1#!/usr/bin/perl
2use strict;
3use warnings;
d111406d 4
5use Test::More tests => 2;
6
7my @warnings;
8local $SIG{__WARN__} = sub { push @warnings,@_ };
9 eval <<EOP;
10package MyThingy;
11use Moose;
12
13has foo => ( is => 'rw' );
14sub foo { 'omglolbbq' }
15
16package main;
17EOP
18
fe587668 19TODO: {
20 local $TODO = "Class-MOP does not warn about this yet";
21 is( scalar(@warnings), 1, 'got 1 warning' );
22 like( $warnings[0], qr/\bfoo\b.+redefine/, 'got a redefinition warning that mentions redefining or overriding or something');
23}