On Apr 4, 2007, at 10:47 AM, Rob Sanheim wrote: > Does anyone have any ideas on how to test capistrano custom tasks? > Just call them from a normal unit test via a system call, and assert > the results?
This will be easier to do in cap2. I'm working right now on unit tests for the deploy tasks, whereas the tasks in cap1 have no tests at all. :( But whether you do it in cap1 or cap2, the "best" way is going to involving mocking up the command system and then asserting that the commands you expected were invoked on the servers you expected. It sounds complicated on paper, I know. In practice, it's even worse. : ( I may see if I can package some helpers with cap2 to make it easier to unit test your tasks. - Jamis --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
