[Catalyst] unit testing with MockObject

Matt S Trout dbix-class at trout.me.uk
Sat Jun 3 12:51:56 CEST 2006


Daniel McBrearty wrote:
> 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.

Engoi->components->{Controller::Public} = $mock;

maybe



More information about the Catalyst mailing list