X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FScript%2FTest.pm;h=53473a4a6bd8513d242769522b62ff0961501d77;hb=4387c692275eec8f24bfa188867500f16331180c;hp=e8452030c5d37eca48d16b5ebc87167c8be06953;hpb=0ba6e8aaafec7621c9444f470a849bd161f176e0;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Script/Test.pm b/lib/Catalyst/Script/Test.pm index e845203..53473a4 100644 --- a/lib/Catalyst/Script/Test.pm +++ b/lib/Catalyst/Script/Test.pm @@ -1,3 +1,43 @@ package Catalyst::Script::Test; +use Moose; +use Catalyst::Test (); +use namespace::autoclean; -1; +with 'Catalyst::ScriptRole'; + +sub run { + my $self = shift; + + Catalyst::Test->import($self->application_name); + + print request($self->ARGV->[0])->content . "\n"; +} + + +__PACKAGE__->meta->make_immutable; + +=head1 NAME + +Catalyst::Script::Test - Test Catalyst application on the command line + +=head1 SYNOPSIS + + myapp_test.pl [options] /path + + Options: + -h --help display this help and exits + +=head1 DESCRIPTION + +Script to perform a test hit against your application and display the output. + +=head1 AUTHORS + +Catalyst Contributors, see Catalyst.pm + +=head1 COPYRIGHT + +This library is free software. You can redistribute it and/or modify it under +the same terms as Perl itself. + +=cut