Bug fix for require dieing as make_immutable doesn't return true.
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Script / Test.pm
index 8fe9d73..4209d62 100644 (file)
@@ -1,23 +1,23 @@
 package Catalyst::Script::Test;
 use Moose;
+use Catalyst::Test ();
 use namespace::autoclean;
 
 with 'Catalyst::ScriptRole';
 
-has '+help' => (cmd_aliases => 'h');
-
 sub run {
     my $self = shift;
 
-    Class::MOP::load_class("Catalyst::Test");
     Catalyst::Test->import($self->application_name);
 
-    print request($ARGV[1])->content  . "\n";
-
+    foreach my $arg (@{ $self->ARGV }) {
+        print request($arg)->content  . "\n";
+    }
 }
 
 
 __PACKAGE__->meta->make_immutable;
+1;
 
 =head1 NAME
 
@@ -25,11 +25,18 @@ Catalyst::Script::Test - Test Catalyst application on the command line
 
 =head1 SYNOPSIS
 
-See L<Catalyst>.
+  myapp_test.pl [options] /path
+
+  Options:
+  -h     --help           display this help and exits
 
 =head1 DESCRIPTION
 
-FIXME
+Script to perform a test hit against your application and display the output.
+
+=head1 SEE ALSO
+
+L<Catalyst::ScriptRunner>
 
 =head1 AUTHORS