Commit | Line | Data |
---|---|---|
ae907ae0 | 1 | #!/usr/bin/perl |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | ||
6 | use Test::More tests => 2; | |
7 | ||
8 | use Moose (); | |
9 | use Moose::Meta::Class; | |
10 | ||
11 | my $meta = Moose::Meta::Class->create_anon_class; | |
12 | ||
13 | #local $TODO = 'not implemented yet'; | |
14 | ||
15 | eval { $meta->add_attribute('foo') }; | |
16 | like $@, qr/Attribute \(foo\) has no associated methods/, | |
17 | 'correct error message'; | |
18 | ||
19 | ok( | |
20 | eval { $meta->add_attribute('bar', is => 'bare'); 1 }, | |
21 | 'add attribute with no methods', | |
22 | ) or diag $@; |