8 use Scalar::Util 'blessed';
35 ok(!$obj->can( 'talk' ), "... the role is not composed yet");
36 ok(!$obj->can( 'fur' ), 'ditto');
37 ok(!$obj->does('Dog'), '... we do not do any roles yet');
41 }, undef, '... and setting the accessor fails (not a Dog yet)' );
43 Dog->meta->apply($obj);
45 ok($obj->does('Dog'), '... we now do the Bark role');
46 ok($obj->can('talk'), "... the role is now composed at the object level");
47 ok($obj->can('fur'), "it has fur");
49 is($obj->talk, 'woof', '... got the right return value for the newly composed method');
53 }, undef, '... and setting the accessor is okay' );
55 is($obj->fur, "dirty", "role attr initialized");