More prereq updating. Prep for 0.02 release.
[gitmo/MooseX-SemiAffordanceAccessor.git] / t / basic.t
CommitLineData
a338e27f 1use strict;
2use warnings;
3
4use Test::More tests => 8;
5
6
7{
8 package Standard;
9
10 use Moose;
11
12 has 'thing' => ( is => 'rw' );
13 has '_private' => ( is => 'rw' );
14}
15
16{
17 package SF;
18
19 use Moose::Policy 'MooseX::Policy::SemiAffordanceAccessor';
20 use Moose;
21
22 has 'thing' => ( is => 'rw' );
23 has '_private' => ( is => 'rw' );
24}
25
26
27ok( Standard->can('thing'), 'Standard->thing() exists' );
28ok( ! Standard->can('set_thing'), 'Standard->set_thing() does not exist' );
29ok( Standard->can('_private'), 'Standard->_private() exists' );
30ok( ! Standard->can('_set_private'), 'Standard->_set_private() does not exist' );
31
32ok( SF->can('thing'), 'SF->thing() exists' );
33ok( SF->can('set_thing'), 'SF->set_thing() exists' );
34ok( SF->can('_private'), 'SF->_private() exists' );
35ok( SF->can('_set_private'), 'SF->_set_private() exists' );