2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
11 use Scalar::Util 'blessed';
38 ok(!$obj->can( 'talk' ), "... the role is not composed yet");
39 ok(!$obj->can( 'fur' ), 'ditto');
40 ok(!$obj->does('Dog'), '... we do not do any roles yet');
44 } '... and setting the accessor fails (not a Dog yet)';
46 Dog->meta->apply($obj);
48 ok($obj->does('Dog'), '... we now do the Bark role');
49 ok($obj->can('talk'), "... the role is now composed at the object level");
50 ok($obj->can('fur'), "it has fur");
52 is($obj->talk, 'woof', '... got the right return value for the newly composed method');
56 } '... and setting the accessor is okay';
58 is($obj->fur, "dirty", "role attr initialized");