summary refs log tree commit diff
path: root/t/06_die_with_inexistant_class.t
diff options
context:
space:
mode:
Diffstat (limited to 't/06_die_with_inexistant_class.t')
-rw-r--r--t/06_die_with_inexistant_class.t18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/06_die_with_inexistant_class.t b/t/06_die_with_inexistant_class.t
new file mode 100644
index 0000000..fcf600b
--- /dev/null
+++ b/t/06_die_with_inexistant_class.t
@@ -0,0 +1,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/;