sub can-ok

Documentation for sub can-ok assembled from the following types:

module Test

From Test

(Test) sub can-ok

Defined as:

multi sub can-ok(Mu $varStr $meth,$desc = "..." )

Marks a test as passed if the given $variable can run the given $method-name. The function accepts an optional description. For instance:

    class Womble {};
    my $womble = Womble.new;
 
    # with automatically generated test description 
    can-ok $womble'collect-rubbish';
    #  => An object of type 'Womble' can do the method 'collect-rubbish' 
 
    # with human-generated test description 
    can-ok $womble'collect-rubbish'"Wombles can collect rubbish";
    #  => Wombles can collect rubbish