On Sun, Apr 20, 2008 at 12:51:44PM +1000, Yao Wang wrote:
> Hi Everybody,
> 
> Recently, i am looking for some modules for unit testing. I have seen 
> Catalyst::Test, Test::WWW::Mechanize::Catalyst etc, i think they are the 
> testing tools for application, not for unit testing. When i do the unit 
> testing, i need to pass $c and some other params to the methods right ? But 
> how can i create $c for testing ?
> So can anybody tell me how to create this kind of $c ?

Test::MockObject if you really want to.

Personally I think that if you've got enough logic in your controller (as
opposed to your model) to -need- unit testing you're doing something wrong.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to