テストスクリプトが綺麗にかけない

というかすごい汚くなる。うう。

抜粋

my $req        = Test::MockObject->new;
my $res        = HTTP::Response->new;
my $user_class = Test::MockObject->new;
my $params     = {};
$res->{success} = 1;
$req->fake_module('Catalyst::Request');
$req->mock( params => sub {$params} );
$user_class->fake_module('Fake::User::Class');
$config->{user_class} = 'Fake::User::Class';
$c->mock( req                => sub {$req} );
$c->mock( default_auth_store => sub { } );
$c->mock( set_authenticated  => sub { } );

きも。。

by typester / at 2006-01-12T01:35:00 / perl / Comments(0)