doc patch from Andrew Ford
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Test.pm
index 58be192..0b3349f 100644 (file)
@@ -61,7 +61,7 @@ sub import {
     my $self = shift;
     $class = shift;
     $class->require;
-    if ( ( caller(0) )[1] eq '-e' ) {
+    unless ( $INC{'Test/Builder.pm'} ) {
         die qq/Couldn't load "$class", "$@"/ if $@;
     }
     my $caller = caller(0);
@@ -162,7 +162,7 @@ sub server {
         $ENV{REMOTE_ADDR}     = $peeraddr;
         $ENV{REMOTE_HOST}     = $peername;
         $ENV{QUERY_STRING}    = $query_string || '';
-        $ENV{CONTENT_TYPE}    ||= 'text/plain';
+        $ENV{CONTENT_TYPE}    ||= 'multipart/form-data';
         $ENV{SERVER_SOFTWARE} ||= "Catalyst/$Catalyst::VERSION";
         $class->run;
     }