In module Test§

See primary documentation in context for sub does-ok

multi sub does-ok(Mu $varMu $type$desc = "...")

Marks a test as passed if the given $var can do the given role $type. The function accepts an optional description of the test.

# create a Womble who can invent 
role Invent {
    method brainstorm { say "Aha!" }
}
class Womble {}
class Tobermory is Womble does Invent {}
 
# ... and later in the tests 
use Test;
 
my $tobermory = Tobermory.new;
 
# with automatically generated test description 
does-ok $tobermoryInvent;
#  => The object does role Type 
 
does-ok $tobermoryInvent"Tobermory can invent";
#  => Tobermory can invent