File: compose-non-role.t

package info (click to toggle)
libmoo-perl 2.005005-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 840 kB
  • sloc: perl: 2,506; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 281 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use CaptureException;

$INC{'MyRole.pm'} = __FILE__;

{
  package MyClass;
  use Moo;
  ::like(::exception { with 'MyRole'; }, qr/MyRole is not a Moo::Role/,
    'error when composing non-role package');
}

done_testing;