2 BEGIN{ $ENV{MOUSE_VERBOSE} = 1 }
6 use Test::More tests => 2;
9 use Mouse::Meta::Class;
11 my $meta = Mouse::Meta::Class->create('Banana');
14 $SIG{__WARN__} = sub { $warn = "@_" };
16 $meta->add_attribute('foo');
17 like $warn, qr/Attribute \(foo\) of class Banana has no associated methods/,
18 'correct error message';
21 $meta->add_attribute('bar', is => 'bare');
22 is $warn, '', 'add attribute with no methods and is => "bare"';