Bug fix for require dieing as make_immutable doesn't return true.
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Script / Test.pm
index f3da4e1..4209d62 100644 (file)
@@ -1,5 +1,6 @@
 package Catalyst::Script::Test;
 use Moose;
+use Catalyst::Test ();
 use namespace::autoclean;
 
 with 'Catalyst::ScriptRole';
@@ -7,15 +8,16 @@ with 'Catalyst::ScriptRole';
 sub run {
     my $self = shift;
 
-    Class::MOP::load_class("Catalyst::Test");
-    Catalyst::Test->import($self->app);
-
-    print request($ARGV[1])->content  . "\n";
+    Catalyst::Test->import($self->application_name);
 
+    foreach my $arg (@{ $self->ARGV }) {
+        print request($arg)->content  . "\n";
+    }
 }
 
 
 __PACKAGE__->meta->make_immutable;
+1;
 
 =head1 NAME
 
@@ -23,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