Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: How to test a Moose Role?

by Nomad (Pilgrim)
on Aug 08, 2011 at 12:11 UTC ( #919202=note: print w/ replies, xml ) Need Help??

in reply to How to test a Moose Role?

One way is to write a minimal class that consumes the role and then write tests against the class.

Also, you might want to test your consuming classes anyway, because, you need to make sure they are consumed in the way you expect, and you might have different return values or arguments that need to be tested. For example, I have a project where two different classes consume a role. One class returns 'undef' on failure and another has to, because of what the class actually does, return '' on failure. These situations are similar but different and need to be tested appropriately.

Comment on Re: How to test a Moose Role?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://919202]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2015-11-26 00:49 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (695 votes), past polls