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