### ----------------------------------------------------
### -- HTTP::Roles
### -- Licenses: Artistic-2.0
### -- Authors: Tony O'Dell
### -- File: t/00-use.rakutest
### ----------------------------------------------------
use Test;
use HTTP::Server::Role;

plan 2;

ok !so try {
    CATCH { default { False; } };
    my $r = (class {

    }).new;
    $r does HTTP::Server::Role;
    $r.middleware;
    True;
}, 'Class must implement methods from role';

ok try {
    CATCH { default { .say; False; } };
    my $r = (class :: does HTTP::Server::Role {
        method middleware { qw<hi>; }
        method after      { qw<hi>; }
        method handler    { qw<hi>; }
        method listen     { qw<hi>; }
    }).new;
    True;
}, 'Can instantiate with all methods defined';

# vim: expandtab shiftwidth=4


