[Catalyst] unit testing with MockObject
Daniel McBrearty
danielmcbrearty at gmail.com
Sat Jun 3 09:37:20 CEST 2006
I am doing this :
my $mock = Test::MockObject->new;
$mock->fake_module('Engoi::Controller::Public');
$mock->set_true('home');
almost the first thing in the test file.
Later I do a get on /public/home, but the method in the real
controller still gets called.
cheers
D
On 6/3/06, Daniel McBrearty <danielmcbrearty at gmail.com> wrote:
> can someone point me at a nice example of testing a controller while
> stubbing out another one with MockObject, please.
>
> basically, I have 2 controllers, they both redirect under various
> circumstances which interact. I want to test one in isolation if I
> can.
>
> thanks
>
> --
> Daniel McBrearty
> email : danielmcbrearty at gmail.com
> www.engoi.com : the multi - language vocab trainer
> BTW : 0873928131
>
--
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131
More information about the Catalyst
mailing list