Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
"be consistent"
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2014-04-21 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (495 votes), past polls