Updated Catalyst::Test to use HTTP::Request::AsCGI
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Helper.pm
index 00a5434..d63c7c1 100644 (file)
@@ -839,14 +839,12 @@ it under the same terms as Perl itself.
 __test__
 [% startperl %] -w
 
-BEGIN { $ENV{CATALYST_ENGINE} ||= 'Test' }
-
 use strict;
 use Getopt::Long;
 use Pod::Usage;
 use FindBin;
 use lib "$FindBin::Bin/../lib";
-use [% name %];
+use Catalyst::Test '[% name %]';
 
 my $help = 0;
 
@@ -854,7 +852,7 @@ GetOptions( 'help|?' => \$help );
 
 pod2usage(1) if ( $help || !$ARGV[0] );
 
-print [% name %]->run($ARGV[0])->content . "\n";
+print request($ARGV[0])->content . "\n";
 
 1;