File: compose-non-role.t

package info (click to toggle)
libmoo-perl 2.002005-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 856 kB
  • ctags: 192
  • sloc: perl: 2,561; makefile: 6
file content (14 lines) | stat: -rw-r--r-- 254 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use Moo::_strictures;
use Test::More;
use Test::Fatal;

$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;