Hi Everyone,

After some research and tries. The testing code looks like following:

BEGIN { use_ok 'MyApp::Controller::abc' };

my $c = MyApp->prepare();

$c = Test::MockObject::Extends->new($c);

$c->set_always('forward',{});

MyApp::Controller::abc->get_info( $c);

ok($c->stash->{template} eq "get_info.tt2", "comparing template returned for 
get_ info page");

What i tried  is to check stash is correct and allow forward.

What do you think about this ?

Thanks,
61966

_______________________________________________
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