On 16 Jan 2010, at 23:56, Stuart Watt wrote:
Does anyone have a good recipe for mocking Catalyst components? Any
suggestions for good tools/modules to use?
I tend to just use Moose directly to construct mock classes for me:
my $meta = Class::MOP::Class->make_anon_class( superclasses =>
['Moose::Object']);
$meta->add_method(foo => sub {...});
... etc ...
my $i = $meta->name->new;
# And go :)
Cheers
t0m
_______________________________________________
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/