summary refs log tree commit diff
path: root/t/06_die_with_inexistant_class.t
blob: fcf600b3da5b93dab633a8d176cc84a4954a7623 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
use warnings;
use Test::More tests => 2;
use Test::Exception;

BEGIN {
	package My::Factory;
	use MooseX::AbstractFactory;
	use Moose;
}

dies_ok {
	my $imp = My::Factory->create(
    	'FooBar', {}
	);
} "Factory->new() die";

like $@, qr/Can't locate My\/Factory\/FooBar.pm/;