[Catalyst] unit testing with MockObject

Matt S Trout dbix-class at trout.me.uk
Sat Jun 3 18:36:05 CEST 2006


Daniel McBrearty wrote:
> I also get this in the output :
> 
> Engoi::Controller::Public->_DISPATCH "Can't use an undefined value as
> an ARRAY reference at /usr/local/share/perl/5.8.7/Catalyst/Base.pm
> line 19."
> 
> which is this in Base.pm :
> 
> sub _DISPATCH : Private {
>     my ( $self, $c ) = @_;
>     foreach my $disp ( @{ $self->_dispatch_steps } ) { # line 19
>         last unless $c->forward($disp);
>     }
>     $c->forward('_END');
> }
> 
> 
>  ... but i'm not going to worry about it right now ...

You can't dispatch to a controller you're mocking unless you mock the 
internal dispatch stuff as well ...



More information about the Catalyst mailing list