25 September 2007
This post may be outdated due to it was written on 2007. The links may be broken. The code may be not working anymore. Leave comments if needed.
one is using Test::WWW::Mechanize::Catalyst. as recommended in Catalyst::Manual::Tutorial::Testing.

the other way is using MyApp to get $c. like here:

my $controller = MyApp->controller('MyController');
my $c = MyApp->prepare();

# Monkey with $c to set up a fake context (set req->uri, or params)

my $result = $controller->method_to_test($c, @args);


blog comments powered by Disqus