the beginnings of Moose handling
[gitmo/Moo.git] / xt / handle_moose.t
CommitLineData
3362e41c 1use strictures 1;
2
3BEGIN { require "t/moo-accessors.t"; }
4
5use Moo::HandleMoose;
6
7my $meta = Class::MOP::get_metaclass_by_name('Foo');
8
9my $attr;
10
11ok($attr = $meta->get_attribute('one'), 'Meta-attribute exists');
12is($attr->get_read_method, 'one', 'Method name');
13is($attr->get_read_method_ref->body, Foo->can('one'), 'Right method');
14
15is(Foo->new(one => 1, THREE => 3)->one, 1, 'Accessor still works');
16
17done_testing;