App-plackbench

 view release on metacpan or  search on metacpan

t/03_plackbench_pm.t  view on Meta::CPAN

    eval {
        $bench->run();
    };
    like($@, qr/failed/, 'should eval the file and use it\'s sub');

    $bench->fixup(undef);
    $bench->add_fixup_from_file("$Bin/fail_redirect");
    is(Scalar::Util::reftype($bench->fixup()->[0]), 'CODE', 'should initialize fixup() if necessary');

    eval {
        $bench->add_fixup_from_file("$Bin/does_not_exist");
    };
    
    # Don't try and check that the error contains "No such file", cause that's
    # a different error in German (just sayin', it's not it came up or
    # anything...)
    ok($@, 'should die when file doesn\'t exist');

    eval {
        $bench->add_fixup_from_file("$Bin/syntax_error");
    };



( run in 0.429 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )