Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 6th, 2012  |  syntax: None  |  size: 0.45 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # 500
  2. test_psgi
  3.     app => builder {
  4.         enable "StackTrace", no_print_errors => 1; # no warning in make test.
  5.         MyApp->handler
  6.     },
  7.     client => sub {
  8.         my $cb = shift;
  9.         my $req = HTTP::Request->new( GET => 'http://localhost/foo/error' );
  10.         $req->header('Accept' => 'text/html'); # get stack trace message
  11.         my $res = $cb->( $req );
  12.         is $res->code, '500';
  13.         like $res->content, qr|\Qdie "error"\E|;
  14.     } ;