Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

45 lines (36 sloc) 0.891 kB
use warnings;
use strict;
use Test::More tests => 10;
use Test::Exception;
use lib 't'; use Utils;
BEGIN { use_ok('Feersum') };
my ($socket,$port) = get_listen_socket();
ok $socket, "made listen socket";
ok $socket->fileno, "has a fileno";
my $evh = Feersum->new();
no warnings 'redefine';
*Feersum::DIED = sub {
my $err = shift;
like $err, qr/holy crap/, 'DIED was called';
$evh->request_handler(sub {
my $r = shift;
die "holy crap!";
lives_ok {
} 'assigned socket';
my $cv = AE::cv;
my $w = simple_client GET => "/?blar", timeout => 3, sub {
my ($body, $headers) = @_;
is $headers->{Status}, 500, "client got 500";
is $headers->{'content-type'}, 'text/plain';
is $body, "Request handler exception.\n", 'got expected body';
pass "all done";
Jump to Line
Something went wrong with that request. Please try again.