In module Test§
See primary documentation in context for sub does-ok.
multi does-ok(Mu $var, Mu $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 $tobermory, Invent; # => The object does role Type does-ok $tobermory, Invent, "Tobermory can invent"; # => Tobermory can invent